Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save As macro
I want to open a template, fill in some info, and then run a macro t save as a certain name. For example, after I open the template, I will type in John Smith in A and 6/7/05 in B1. I want to run a macro that will automatically sav that template as "JS060705.xls". How can I do that -- Tha BeatMake ----------------------------------------------------------------------- Tha BeatMaker's Profile: http://www.excelforum.com/member.php...fo&userid=2399 View this thread: http://www.excelforum.com/showthread.php?threadid=37973 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save As macro
Tha BeatMaker Wrote: I want to open a template, fill in some info, and then run a macro to save as a certain name. For example, after I open the template, I will type in John Smith in A1 and 6/7/05 in B1. I want to run a macro that will automatically save that template as "JS060705.xls". How can I do that? Put a button on the template file. Assign the following macro to the button: Code: -------------------- Sub Button1_Click() Dim dt Dim nm nm = Range("A1").Value nm = Left$(nm,1) & Mid$(nm,InStr(nm," ")+1,1) dt = DateValue(Range("B1").Value) dt = Format(dt,"MMDDYY") Activeworkbook.SaveAs FileName: = nm & dt & ".xls" End Sub -------------------- HTH -- tkstock ------------------------------------------------------------------------ tkstock's Profile: http://www.excelforum.com/member.php...o&userid=14443 View this thread: http://www.excelforum.com/showthread...hreadid=379737 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to Insert Current Date into cell - Macro to "Save As" | Excel Worksheet Functions | |||
MACRO SAVE HELP | Excel Worksheet Functions | |||
Macro to Save without the Save Message | Excel Discussion (Misc queries) | |||
ASP: Open Excel File with Macro, Allow Macro to run, and then save | Excel Programming | |||
Prompted to save changes after macro save - why? | Excel Programming |