G
Guest
I have the following code which save a file from one directory to another and adds the date with each save:
ChDir "I:\EXLDATA\BatchTracking"
Workbooks.Open Filename:="I:\EXLDATA\BatchTracking\AttyPlace.xls"
ChDir "I:\EXLDATA\ATTYMGMT\Batch Tracking"
ActiveWorkbook.SaveAs Filename:= _
"I:\EXLDATA\ATTYMGMT\Batch Tracking\AttyPlace" & _
Format(Date, "yyyy-mm-dd") & ".xls", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWindow.Close
End Sub
I run the file on Monday, but would like it to save with Friday's date. Would it be possible to do something like TodaysDate - 3, or Date, "yyyy-mm-dd - 3"?
ChDir "I:\EXLDATA\BatchTracking"
Workbooks.Open Filename:="I:\EXLDATA\BatchTracking\AttyPlace.xls"
ChDir "I:\EXLDATA\ATTYMGMT\Batch Tracking"
ActiveWorkbook.SaveAs Filename:= _
"I:\EXLDATA\ATTYMGMT\Batch Tracking\AttyPlace" & _
Format(Date, "yyyy-mm-dd") & ".xls", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWindow.Close
End Sub
I run the file on Monday, but would like it to save with Friday's date. Would it be possible to do something like TodaysDate - 3, or Date, "yyyy-mm-dd - 3"?