VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



open and save files from a common dialog control in a text editor.

by Brandon (46 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 29th June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

open and save files from a common dialog control in a text editor.

Rate open and save files from a common dialog control in a text editor.



'select Microsoft Common Dialog Controls 6.0
'also grab a Microsoft Richtextbox control.
'create a menu in the menu handler and insert the following code.

Private Sub mnuFileOpen_Click ()
'open files
On Error GoTo Report:
CommonDialog1.ShowOpen
RichtextBox1.Loadfile (CommonDialog1.FileName)
Report:
Msgbox Err.Description & Err.Source

End Sub

Private Sub mnuFileSave_Click ()
'save files
On Error GoTo Report:
CommonDialog1.ShowSave
RichtextBox1.Savefile (CommonDialog1.FileName)
Report:
Msgbox Err.Description & Err.Source

End Sub

Download this snippet    Add to My Saved Code

open and save files from a common dialog control in a text editor. Comments

No comments have been posted about open and save files from a common dialog control in a text editor.. Why not be the first to post a comment about open and save files from a common dialog control in a text editor..

Post your comment

Subject:
Message:
0/1000 characters