- Home
·
- Miscellaneous
·
- This code is used for a basic Save As function for my text editor. The code does file validty var
This code is used for a basic Save As function for my text editor. The code does file validty var
This code is used for a basic "Save As" function for my text editor. The code does file validty varification and if the code is valid the file
API Declarations
Dim strText As String 'string for file text, could later be declared as an array
'for larger amounts of text
Rate This code is used for a basic Save As function for my text editor. The code does file validty var
(1(1 Vote))
'get file name
strFileName = InputBox("File name:", "Save File")
'check file validity, create file if valid
If strFileName = "" Then
MsgBox "Improper file name."
Exit Sub
Else
'open file
Open VB.App.Path & "/" & strFileName For Output As #1
'write file
strText = txtText.Text
Print #1, strText
'close file
Close #1
End If
End Sub
This code is used for a basic Save As function for my text editor. The code does file validty var Comments
No comments yet — be the first to post one!
Post a Comment