Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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... 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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save as Command Line | Excel Discussion (Misc queries) | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) | |||
Specify a default file name in VB when the Save / Save As command. | Excel Programming | |||
Save changes command | Excel Programming | |||
Save As command | Excel Programming |