Dim sFileName As String
Dim fileBrowse As New System.Windows.Forms.OpenFileDialog()
'Note that all this Save dialog stuff is optional, but it is nicer than just an InputBox in many cases.
fileBrowse.AddExtension = True
fileBrowse.DefaultExt = ".txt"
fileBrowse.ValidateNames = True
fileBrowse.OverwritePrompt = True
fileBrowse.FileName = "File1.txt"
fileBrowse.InitialDirectory = _
System.Environment.GetFolderPath(Environment.SpecialFolder.Personal)
fileBrowse.RestoreDirectory = True
fileBrowse.Title = "Please Enter a File Name To Save Under"
fileBrowse.ShowDialog()
sFileName = fileBrowse.FileName
Dim myNewFile As New System.IO.StreamWriter(sFileName, False)
myNewFile.WriteLine("-- New fileName--")
myNewFile.Close()
Dim fileBrowse As New System.Windows.Forms.OpenFileDialog()
'Note that all this Save dialog stuff is optional, but it is nicer than just an InputBox in many cases.
fileBrowse.AddExtension = True
fileBrowse.DefaultExt = ".txt"
fileBrowse.ValidateNames = True
fileBrowse.OverwritePrompt = True
fileBrowse.FileName = "File1.txt"
fileBrowse.InitialDirectory = _
System.Environment.GetFolderPath(Environment.SpecialFolder.Personal)
fileBrowse.RestoreDirectory = True
fileBrowse.Title = "Please Enter a File Name To Save Under"
fileBrowse.ShowDialog()
sFileName = fileBrowse.FileName
Dim myNewFile As New System.IO.StreamWriter(sFileName, False)
myNewFile.WriteLine("-- New fileName--")
myNewFile.Close()