Call the Save As dialog

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
 
G

Guest

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

Application.Dialogs(xlDialogSaveAs).Show "C:\Windows"
 
B

Bob Umlas

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
 
G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top