Macro to save file as date
Posted by Lewis on September 25, 2000 9:39 PM
Hi,
I'm trying to create a macro to automatically save my current file as a date however, I need the date to be one day ahead of the current date. So, if today is the 26th, I would like the macro to run saving the file as the 27th. The following formula is as close as I can find but, it will only save as "today", not "tomorrow".
Sub SaveAsTodaysDate()
Dim sFileName As String, sPath As String
sPath = "C:\" 'change path here
sFileName = Format(Now(), "ddmmmyy")
'File =sPath & sFileName Might fit in nice to do this way so you have a varialble to call the file
ActiveWorkbook.SaveAs (sPath & sFileName)
End Sub
Thanks for any help.
Lewis.