Call the Save As dialog

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a macro that copies data from one spreadsheet into a new workbook. At
the end I want to call the Save As dialog for the user to enter a file name
and save straight away.

I know this is probably dead easy, but I just can't get it working.

cdb
 
Since you have never saved the file before you can specify the path...

Application.Dialogs(xlDialogSaveAs).Show "C:\Windows"
 
ans = Application.GetSaveAsFilename(filefilter:="*.xls, *.xls")
This won't save the file, but will place the file name & path in the
variable Ans. Then you can save it via
Activeworkbook.SaveAs ans
 
Cheers. Will give this a go.

I may have got around it using application.getsaveasfilename and then
application.saveas - wasn't expecting to need to use them both.

cdb
 
Cheers

Bob Umlas said:
ans = Application.GetSaveAsFilename(filefilter:="*.xls, *.xls")
This won't save the file, but will place the file name & path in the
variable Ans. Then you can save it via
Activeworkbook.SaveAs ans
 
Back
Top