by omides (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 17th November 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Save TXT file
On Error GoTo Err_Found
Dim FileName As String
Dim FileNumber As Integer
FileName = InputBox("Enter the path for a text file to save", _
"Open", "C:\test.txt", 0, 0)
If FileName = "" Then Exit Sub
FileNumber = FreeFile
Open FileName For Output As FileNumber
Print #FileNumber, Text1.Text
Close FileNumber
Exit Sub
Err_Found:
MsgBox Err.Description & vbCrLf & Err.Number
End Sub