Help needed with 'Save As' dialog
hi Tom - thanks for replying. This code works very well, but it actually
goes ahead and Saves before the user has a chance to change the suggested
values in the 'Save In' and 'File Name' drop-down boxes. I was hoping to
show the Save As Dialog with these boxes filled in, but give the user the
option to make changes before clicking Save. I've noticed that...
Application.Dialogs(xlDialogSaveAs).Show strFileName
will show the dialog box this way, waiting for the user to click Save or
Cancel. I just can't get the 'Save In' drop-down box to show the value of
strSaveLocation.
Terry W
"Tom Hutchins" wrote:
If the file path & name are already established, why show a Save As dialog?
You can do the Save As directly:
ActiveWorkbook.SaveAs Filename:=strSaveLocation & "\" & strFileName, _
FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Hope this helps,
Hutch
"terry w" wrote:
hello gurus
I'm having trouble with the following code. The last line I've show works
perfectly - the 'Save As' dialog comes up, and the 'File Name' drop-down box
correctly shows the value of strFileName. But, I can't figure out how to get
the 'Save In' drop down box to show the value of strSaveLocation.
strSaveLocation = "C:\EmpData\2009"
strFileName = "Report_" & strDate & "_" & strEmpName & ".xls"
Application.Dialogs(xlDialogSaveAs).Show strFileName
Any clues welcomed!
Terry W.
|