MrRhodes2004
04-20-2007, 09:47 AM
Sub CreateAfile()
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.CreateTextFile("c:\testfile.txt", True)
f.WriteLine ("This is a test.")
f.Close
End Sub
I can use VBA to Create a text file via the manner above. But the problem is that the programmer dictates the location and file name in the code. Is there a way to have the user define the folder and file name with a dialog box? If so, how?
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.CreateTextFile("c:\testfile.txt", True)
f.WriteLine ("This is a test.")
f.Close
End Sub
I can use VBA to Create a text file via the manner above. But the problem is that the programmer dictates the location and file name in the code. Is there a way to have the user define the folder and file name with a dialog box? If so, how?