I use the below code to save a file with a date and a password
ActiveWorkbook.SaveAs Filename:="\\ukancbdata02\S-gdata\AllFiles\Recon\London\Events\Consolidated Report\Consolidated " & Format(DateAdd("d", -0, Date), "YYYY") & ".xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="pact", _
ReadOnlyRecommended:=True, CreateBackup:=False
What I need to do do is overwrite the file each day but because it is password protected the code returns an error.
Could an Expert provide me with the code that will enable me to save the file each day over the existing file with the password.
which PW is missing
ActiveWorkbook.SaveAs Filename:="\\ukancbdata02\
FileFormat:=xlNormal, Password:="", WriteResPassword:="pact", _
ReadOnlyRecommended:=True,
Regards