Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default saving file name and location with excel macro



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\FATTUR AZIONE\FATTURE", _
"Workbook (*.xls),*.xls", , "Save As...")

Thank you for your help.
Alex

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default saving file name and location with excel macro

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)

Alex Suardi wrote:

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\FATTUR AZIONE\FATTURE", _
"Workbook (*.xls),*.xls", , "Save As...")

Thank you for your help.
Alex

*** Sent via Developersdex http://www.developersdex.com ***


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA for saving a file to a specific location TimT Excel Programming 6 July 7th 05 08:50 PM
Saving file to a location determined by a cell Dan Hulgin[_7_] Excel Programming 0 October 28th 04 08:40 PM
Saving file to a location determined by a cell Goppi[_6_] Excel Programming 0 October 28th 04 01:16 PM
Saving file to a location determined by a cell Dan Hulgin[_3_] Excel Programming 1 October 28th 04 01:01 PM
Saving file to a location determined by a cell Dan Hulgin[_2_] Excel Programming 0 October 26th 04 08:46 PM


All times are GMT +1. The time now is 12:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"