Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
File Names
Can I save a file named ( yesterdays date ) using a macro.
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
File Names
Try...
ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\username\My Documents\" & Format(Now() - 1, "yymmdd") & ".xls" Frank "sd" wrote: Can I save a file named ( yesterdays date ) using a macro. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
File Names
Hi SD,
Try something like: '============= Sub aTester() Dim strPath As String '// CHANGE path to suit strPath = "C:\Documents and Settings\" & _ "YOUR USERNAME\My Documents" '// Or, to save to the default folder: 'strpath=application.DefaultFilePath ActiveWorkbook.SaveAs _ Filename:=strPath _ & "\" & Format(Date - 1, "YYYYMMDD") & ".xls", _ FileFormat:=xlWorkbookNormal End Sub '<<============= --- Regards, Norman "sd" wrote in message oups.com... Can I save a file named ( yesterdays date ) using a macro. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
File names | Excel Worksheet Functions | |||
Open Excel file get error with file names that have spaces in the | Setting up and Configuration of Excel | |||
File Names | Excel Worksheet Functions | |||
EXCEL97 FILE NAMES TRUNCATED TO THE FIRST LETTER IN THE FILE NAME | New Users to Excel | |||
File names | Excel Programming |