ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Save as macro (https://www.excelbanter.com/excel-programming/352172-save-macro.html)

[email protected]

Save as macro
 
I am trying to make a macro which opens the Save As-box. Can anyone
help me?

I know this has been asked before, but on most occations people want
the filename to be based on the input in the worksheet. I just want the
Save As-box to appear, and the user to enter the filename (and choose
the path).


Bob Phillips[_6_]

Save as macro
 
Look at GetSaveAsFilename in VBA help.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

wrote in message
oups.com...
I am trying to make a macro which opens the Save As-box. Can anyone
help me?

I know this has been asked before, but on most occations people want
the filename to be based on the input in the worksheet. I just want the
Save As-box to appear, and the user to enter the filename (and choose
the path).




impslayer

Save as macro
 

skrev:

I am trying to make a macro which opens the Save As-box. Can anyone
help me?

I know this has been asked before, but on most occations people want
the filename to be based on the input in the worksheet. I just want the
Save As-box to appear, and the user to enter the filename (and choose
the path).


Sounds like the very recent 'Breaking a UserForm' thread, have you read
it?

GetSaveAsFilename might be what you need, or did I misunderstand your
requirements?

/impslayer, aka Birger Johansson


[email protected]

Save as macro
 
And where do I find VBA help (would probably help me with many
questions:-) ? When I press the questionmark in my Visual basic window,
and search for GetSaveAsFilename in Index, I get no match (only
GetObject function and GetSetting function).


JK

Save as macro
 
wrote:
And where do I find VBA help (would probably help me with many
questions:-) ? When I press the questionmark in my Visual basic window,
and search for GetSaveAsFilename in Index, I get no match (only
GetObject function and GetSetting function).


put this line to your code:

Application.GetSaveAsFilename

It will open the Save As -prompt


Bob Phillips[_6_]

Save as macro
 
Type GetSaveAsFilename in the immediate window, select it, then press F1.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"JK" wrote in message
oups.com...
wrote:
And where do I find VBA help (would probably help me with many
questions:-) ? When I press the questionmark in my Visual basic window,
and search for GetSaveAsFilename in Index, I get no match (only
GetObject function and GetSetting function).


put this line to your code:

Application.GetSaveAsFilename

It will open the Save As -prompt




[email protected]

Save as macro
 
Thanks. And how do I get the SaveAs-box to filter only excel-files (and
give the file .xls-ending)?


JK

Save as macro
 
Ok, put this to the code:

Application.GetSaveAsFilename , "Excel-files,*.xls", 1, "Give the name"


The overview can be found from the Help files (select the
GetSaveAsFilename in code window and press F1)


[email protected]

Save as macro
 
Very good thank you. Did not know about the F1-function, but it will
help me a lot on other issues as well :-)



All times are GMT +1. The time now is 01:15 PM.

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