Seamus2626
asked on
Amend Save File code
Hi,
I have the below which saves as todays date, i need it amended so it saves as yesterdays date and it must account for weekends.
So saving today would create
14/09
and saving tomorrow will create
17/09
Thanks
Seamus
Strpath = "xyz:\Ldn\BOBPS\BOBPSContr ol\Rep\Mat ch Stats\GLA & SGP New Reporting\Daily Intellimatch File"
strFileSaveName = "" & Format(Date, "yyyymmdd") & ".xls"
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=strFileSaveName, FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False , CreateBackup:=False
I have the below which saves as todays date, i need it amended so it saves as yesterdays date and it must account for weekends.
So saving today would create
14/09
and saving tomorrow will create
17/09
Thanks
Seamus
Strpath = "xyz:\Ldn\BOBPS\BOBPSContr
strFileSaveName = "" & Format(Date, "yyyymmdd") & ".xls"
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=strFileSaveName,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.mrexcel.com/archive/Dates/3039b.html
http://www.excelforum.com/excel-general/542867-excel-macro-save-as-date-of-last-friday.html