Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Save As Macro
Is it possible to create a macro to save an Excel file using the text stored
in a cell (A1 for example) as its filename. At this time cell A1 will contain "LastName FirstName mmddyy". If possible, please help. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Save As Macro
Perhaps:
Sub store_A() Dim s As String s = "C:\Documents and Settings\Owner\My Documents\" & Range("A1").Value & ".xls" ActiveWorkbook.SaveAs Filename:=s End Sub -- Gary''s Student - gsnu200734 "el zorro" wrote: Is it possible to create a macro to save an Excel file using the text stored in a cell (A1 for example) as its filename. At this time cell A1 will contain "LastName FirstName mmddyy". If possible, please help. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Save As Macro
You'd need a macro that contained something like:
Option Explicit Sub SaveMe() with Thisworkbook .saveas filename:=.worksheets("sheet999").range("x88").val ue & ".xls", _ fileformat:=xlworkbooknormal end with End Sub There isn't any validation for the filename. You may want to add some checks. el zorro wrote: Is it possible to create a macro to save an Excel file using the text stored in a cell (A1 for example) as its filename. At this time cell A1 will contain "LastName FirstName mmddyy". If possible, please help. -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Save As Macro
This worked great. Thanks much.
"Gary''s Student" wrote: Perhaps: Sub store_A() Dim s As String s = "C:\Documents and Settings\Owner\My Documents\" & Range("A1").Value & ".xls" ActiveWorkbook.SaveAs Filename:=s End Sub -- Gary''s Student - gsnu200734 "el zorro" wrote: Is it possible to create a macro to save an Excel file using the text stored in a cell (A1 for example) as its filename. At this time cell A1 will contain "LastName FirstName mmddyy". If possible, please help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to Save without the Save Message | Excel Discussion (Misc queries) | |||
Save as Macro | Excel Discussion (Misc queries) | |||
Macro Save As | Excel Discussion (Misc queries) | |||
Macro-Save as | Excel Discussion (Misc queries) | |||
Macro to save | Excel Worksheet Functions |