saving file name and location with excel macro

  • Thread starter Thread starter Alex Suardi
  • Start date Start date
A

Alex Suardi

how can I develop a macro in excel who allows me to automatically set
the file name (eg. content cell B3 + content cell B5) and let me choose
the file location?
The best solution wuold be something like the GetSaveAsFilename method
in which the field "Name" is automatically set.

TheFile =
Application.GetSaveAsFilename("N:\AFC\MURCA\FATTURAZIONE\FATTURE", _
"Workbook (*.xls),*.xls", , "Save As...")

Thank you for your help.
Alex
 
So you want to allow the user to control the drive/folder, but you want to
specify the filename?

If yes, maybe just asking for the drive/folder would be better:

Jim Rech has a BrowseForFolder routine at:
http://www.oaltd.co.uk/MVP/Default.htm
(look for BrowseForFolder)

John Walkenbach has one at:
http://j-walk.com/ss/excel/tips/tip29.htm

If you and all your users are running xl2002+, take a look at VBA's help for:
application.filedialog(msoFileDialogFolderPicker)
 

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

Similar Threads

SAVE AS MACRO 6
File Save Question 6
SAVE AS MACRO 5
SAVE AS MACRO 4
PLEASE HELP!! SAVE MACRO 2
Macro for all Excel Workbooks to print to PDF 2
Excel 2007 Save as .xlsm 3
Lose macros before saving 4

Back
Top