VB File Save

  • Thread starter Thread starter John A
  • Start date Start date
J

John A

I have an Excel 97 workbook that produces a sheet of cheque-print
data. I have a VB macro that reads data from a text file from another
application into the workbook, and another VB Macro that saves data on
this sheet to a comma-delimited text file (for input to Word for
cheque printing).

I currently have the file paths for the text files hard-coded into the
VB macro.

I would like to be able to select the paths from a standard Windows
File Open and File Save box, but the only option I can find is to
enter the path in an InputBox, which is not very good.

Can this be done?

Thanks

John Allen
 
This copied directly from Excel help (GetSaveAsFilename Method)

fileSaveName = Application.GetSaveAsFilename( _
fileFilter:="Text Files (*.txt), *.txt")
If fileSaveName <> False Then
MsgBox "Save as " & fileSaveName
End If

Ian
 
Back
Top