Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to create macro in spreadsheet that will save the file to a specified
location using a specified name followed by the current date. Catch is I want the current date to be inserted automatically. How is this done? may not be able to access at work so if not a prob. post answer to thanx in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this:
ActiveWorkbook.SaveAs FileName:= _ ActiveWorkbook.Name & "_" & DatePart("yyyy", Date) & DatePart("m", Date) & DatePart("d", Date) Then depending on whether you want to save as .csv or .xls, etc. you can add FileFormat:=xlNormal or FileFormat:=xlCSV and other options. You'll have to play with whether or not you need to add the extension (like & ".xls" after the DatePart. HTH -- --Being powerful is like being a lady; if you have to tell people you are, you aren''t. ~~Margaret Thatcher "Budster" wrote: I want to create macro in spreadsheet that will save the file to a specified location using a specified name followed by the current date. Catch is I want the current date to be inserted automatically. How is this done? may not be able to access at work so if not a prob. post answer to thanx in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I save a picture that someone inserted into an Excel file? | Excel Discussion (Misc queries) | |||
Excel automatically updates inserted date | Excel Worksheet Functions | |||
Automatically have the date or time inserted into a cell | Excel Discussion (Misc queries) | |||
Save File with the current date and time. | Excel Programming | |||
Can I automatically enter the current date or current time into a | New Users to Excel |