LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatically include contents of a cell in "Save As..." filename.

As far as I know there are two things you could do;

This would simply save the file automatically and not give them
chance to change the name, adding the contents of cell A1 to the end o
your specified string:

sub workbook_beforeclose(cancel as integer)

activeworkbook.saveas "Field Rating - " & sheet1.range("A1")

end sub


I'm using 2003 so not sure if this one is available in 2000, but migh
be worth a try. It will basically bring up the saveas dialog box an
suggest the concatenated result of your standard string and th
contents of cell A1:

sub workbook_beforeclose(cancel as integer)

activeworkbook.getsaveasfilename "Field Rating - "
sheet1.range("A1")

end sub


I'd recommend having a look at the help files for these methods to ge
a full idea of what can be done with them.

Hope this helps

--
Message posted from http://www.ExcelForum.com

 
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
a Macro to "save as" filename from a cell on the sheet and then pr gugertmk Excel Discussion (Misc queries) 0 March 31st 09 12:32 AM
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION yossie6 Excel Discussion (Misc queries) 1 June 16th 08 12:16 PM
CELL("filename",a1) not updating automatically FiluDlidu Excel Discussion (Misc queries) 0 April 24th 08 08:26 PM
Cell("filename") doesn't update to new filename when do save as. Louis Excel Worksheet Functions 2 March 22nd 07 07:27 PM
how to increase size of "name box" and "contents of cell " displa. Stubby- LIBERTY New Users to Excel 2 February 22nd 07 06:43 PM


All times are GMT +1. The time now is 10:43 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"