ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Call the Save As dialog (https://www.excelbanter.com/excel-programming/371880-call-save-dialog.html)

cdb

Call the Save As dialog
 
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

Jim Thomlinson

Call the Save As dialog
 
Since you have never saved the file before you can specify the path...

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

Jim Thomlinson


"cdb" wrote:

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


Bob Umlas

Call the Save As dialog
 
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

"cdb" wrote in message
...
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




cdb

Call the Save As dialog
 
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

"Jim Thomlinson" wrote:

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

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

Jim Thomlinson


"cdb" wrote:

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


cdb

Call the Save As dialog
 
Cheers

"Bob Umlas" wrote:

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

"cdb" wrote in message
...
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






All times are GMT +1. The time now is 01:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com