Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Macro to "save as"
Hi,
Am using excel 2003 and am wanting to create a macro, attached to a button, that will save as a particular cell #, say A2, and then print. Have the print down pat, but can't figure out the save as part....... -- Thanks for the help |
#2
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Macro to "save as"
What is in cell A2? Try things like these, depending on what you have and what you want to do....
ThisWorkbook.SaveAs Range("A2").Value & ".xls" ThisWorkbook.SaveCopyAs Range("A2").Value & ".xls" ThisWorkbook.SaveAs "C:\Folder Path\" & Range("A2").Value & ".xls", AddToMru:=True ThisWorkbook.SaveAs "C:\Folder Path\FileBaseName " & Format(Range("A2").Value, "yy-mm-dd") & ".xls" HTH, Bernie MS Excel MVP "JS" wrote in message ... Hi, Am using excel 2003 and am wanting to create a macro, attached to a button, that will save as a particular cell #, say A2, and then print. Have the print down pat, but can't figure out the save as part....... -- Thanks for the help |
#3
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Macro to "save as"
Hi Bernie,
Thanks for your response. I enter a number into cell A2, and want excel to save the worksheet as that number, and leave the original as the template. -- Thanks again for the help "Bernie Deitrick" wrote: What is in cell A2? Try things like these, depending on what you have and what you want to do.... ThisWorkbook.SaveAs Range("A2").Value & ".xls" ThisWorkbook.SaveCopyAs Range("A2").Value & ".xls" ThisWorkbook.SaveAs "C:\Folder Path\" & Range("A2").Value & ".xls", AddToMru:=True ThisWorkbook.SaveAs "C:\Folder Path\FileBaseName " & Format(Range("A2").Value, "yy-mm-dd") & ".xls" HTH, Bernie MS Excel MVP "JS" wrote in message ... Hi, Am using excel 2003 and am wanting to create a macro, attached to a button, that will save as a particular cell #, say A2, and then print. Have the print down pat, but can't figure out the save as part....... -- Thanks for the help |
#4
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Macro to "save as"
JS,
Then try using this - it will save in the same folder as the original template: ThisWorkbook.SaveCopyAs ThisWorkbook.Path & "\" & Range("A2").Value & ".xls" HTH, Bernie MS Excel MVP "JS" wrote in message ... Hi Bernie, Thanks for your response. I enter a number into cell A2, and want excel to save the worksheet as that number, and leave the original as the template. -- Thanks again for the help "Bernie Deitrick" wrote: What is in cell A2? Try things like these, depending on what you have and what you want to do.... ThisWorkbook.SaveAs Range("A2").Value & ".xls" ThisWorkbook.SaveCopyAs Range("A2").Value & ".xls" ThisWorkbook.SaveAs "C:\Folder Path\" & Range("A2").Value & ".xls", AddToMru:=True ThisWorkbook.SaveAs "C:\Folder Path\FileBaseName " & Format(Range("A2").Value, "yy-mm-dd") & ".xls" HTH, Bernie MS Excel MVP "JS" wrote in message ... Hi, Am using excel 2003 and am wanting to create a macro, attached to a button, that will save as a particular cell #, say A2, and then print. Have the print down pat, but can't figure out the save as part....... -- Thanks for the help |
#5
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Macro to "save as"
Hey Bernie,
Thanks for all of your help! Works perfectly. -- Cheers "Bernie Deitrick" wrote: JS, Then try using this - it will save in the same folder as the original template: ThisWorkbook.SaveCopyAs ThisWorkbook.Path & "\" & Range("A2").Value & ".xls" HTH, Bernie MS Excel MVP "JS" wrote in message ... Hi Bernie, Thanks for your response. I enter a number into cell A2, and want excel to save the worksheet as that number, and leave the original as the template. -- Thanks again for the help "Bernie Deitrick" wrote: What is in cell A2? Try things like these, depending on what you have and what you want to do.... ThisWorkbook.SaveAs Range("A2").Value & ".xls" ThisWorkbook.SaveCopyAs Range("A2").Value & ".xls" ThisWorkbook.SaveAs "C:\Folder Path\" & Range("A2").Value & ".xls", AddToMru:=True ThisWorkbook.SaveAs "C:\Folder Path\FileBaseName " & Format(Range("A2").Value, "yy-mm-dd") & ".xls" HTH, Bernie MS Excel MVP "JS" wrote in message ... Hi, Am using excel 2003 and am wanting to create a macro, attached to a button, that will save as a particular cell #, say A2, and then print. Have the print down pat, but can't figure out the save as part....... -- Thanks for the help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
a Macro to "save as" filename from a cell on the sheet and then pr | Excel Discussion (Misc queries) | |||
Macro to Insert Current Date into cell - Macro to "Save As" | Excel Worksheet Functions | |||
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION | Excel Discussion (Misc queries) | |||
Macro in WB assigned to toolbar, after "save as" points to differn | Excel Discussion (Misc queries) | |||
"Save" and "Save As" options greyed out - "Save as Webpage" option | Excel Discussion (Misc queries) |