![]() |
save command
I have been working on this now for a few days... I need to make a macro that will allow me to save the document usin some of the info in the worksheet. IE... cell H3 has a name (John_Smith) and cell B2 has a date (11-15-04). I would like to have the macro save the file using that info as th name of the file. John_smith11-15-04.xls I have not been able to come up with the formula for the life of me. my luck it cant me done... :eek: Can anyone help me with this... :) -Ro -- N242N ----------------------------------------------------------------------- N242NY's Profile: http://www.excelforum.com/member.php...fo&userid=1650 View this thread: http://www.excelforum.com/showthread.php?threadid=31367 |
save command
Hi
try sub foo() dim fname as string with activesheet fname=.range("H3").value & format(.range("B2").value,"mm-dd-yy") & ".xls" end with activeworkbook.saveas fname "N242NY" wrote: I have been working on this now for a few days... I need to make a macro that will allow me to save the document using some of the info in the worksheet. IE... cell H3 has a name (John_Smith) and cell B2 has a date (11-15-04). I would like to have the macro save the file using that info as the name of the file. John_smith11-15-04.xls I have not been able to come up with the formula for the life of me.. my luck it cant me done... :eek: Can anyone help me with this... :) -Rob -- N242NY ------------------------------------------------------------------------ N242NY's Profile: http://www.excelforum.com/member.php...o&userid=16508 View this thread: http://www.excelforum.com/showthread...hreadid=313670 |
All times are GMT +1. The time now is 05:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com