Jobs
Author: omides Date Submitted: 11/17/2005 Category: Other Compatibility: VB 6 This code has been accessed 5289 times.
Email Yourself this snippet:
" no. text box needed
Code
Private Sub mnuSave_Click() 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