Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save File with multiple cells values as it's name
Is there a way to make a SaveAs macro that saves with a name this is based
in two cells. The example below only can save with the value of cell A1, what i like to do is save the document with the name of the cell in F4 and F3. If F4 has a name and F3 has a date then the file saved should look like "JDoe_12-01-03". Sub SaveFileAsA1() ThisFile = Format(Range("A1").Value) ActiveWorkbook.SaveAs FileName:=ThisFile End Sub Thanks you for you help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save File with multiple cells values as it's name
One way:
Sub SaveFileAsF4AndF3() ActiveWorkbook.SaveAs Filename:= _ Range("F4").Value & Format(Range("F3").Value, "_mm-dd-yy") End Sub Your example's date was ambiguous, so you may need to use "_dd-mm-yy" instead. In article , "Kevin" ! wrote: Is there a way to make a SaveAs macro that saves with a name this is based in two cells. The example below only can save with the value of cell A1, what i like to do is save the document with the name of the cell in F4 and F3. If F4 has a name and F3 has a date then the file saved should look like "JDoe_12-01-03". Sub SaveFileAsA1() ThisFile = Format(Range("A1").Value) ActiveWorkbook.SaveAs FileName:=ThisFile End Sub Thanks you for you help |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save File with multiple cells values as it's name
Thank you very much,
I did try many variation of this code but did not have the correct syntax and order of commands Kevin "J.E. McGimpsey" wrote in message ... One way: Sub SaveFileAsF4AndF3() ActiveWorkbook.SaveAs Filename:= _ Range("F4").Value & Format(Range("F3").Value, "_mm-dd-yy") End Sub Your example's date was ambiguous, so you may need to use "_dd-mm-yy" instead. In article , "Kevin" ! wrote: Is there a way to make a SaveAs macro that saves with a name this is based in two cells. The example below only can save with the value of cell A1, what i like to do is save the document with the name of the cell in F4 and F3. If F4 has a name and F3 has a date then the file saved should look like "JDoe_12-01-03". Sub SaveFileAsA1() ThisFile = Format(Range("A1").Value) ActiveWorkbook.SaveAs FileName:=ThisFile End Sub Thanks you for you help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
find values in multiple cells and paste row values | Excel Discussion (Misc queries) | |||
can I save a file of multiple names to replace using excell 03 | Excel Discussion (Misc queries) | |||
How do I save an excel file with values instead of formulas? | Excel Worksheet Functions | |||
Save As - Multiple Sheets fails to save as text file | Excel Programming | |||
Macro to insert values from a file and save another sheet as a .txt file | Excel Programming |