S
Stan Halls
i have a script for saving a file to 2 locations, 1st location saves in
excell2007 macro enabled, 2nd location saves in excel2003 compatable version,
i have put a WriteResPassword on 2003 version so its read only...
the trouble i have is when i run the script again it cant save to the 2nd
location as is protected...
script is below any ideas how to solve the issue so it will save over the
password with out falling over
Application.DisplayAlerts = False
ChDir "O:\Distribution\Loadplan\1delsch"
ActiveWorkbook.SaveAs Filename:= _
"O:\Distribution\Loadplan\1delsch\delsch.xlsm", FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, ReadOnlyRecommended:=False,
CreateBackup:=False
Application.DisplayAlerts = True
ChDir "P:\Distribution\Schedule\Bracknell"
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"P:\Distribution\Schedule\Bracknell\Newdelsch.xls",
FileFormat:=xlExcel8, _
Password:="", WriteResPassword:="260959",
ReadOnlyRecommended:=False, _
CreateBackup:=False
Application.DisplayAlerts = True
ActiveWindow.Close
excell2007 macro enabled, 2nd location saves in excel2003 compatable version,
i have put a WriteResPassword on 2003 version so its read only...
the trouble i have is when i run the script again it cant save to the 2nd
location as is protected...
script is below any ideas how to solve the issue so it will save over the
password with out falling over
Application.DisplayAlerts = False
ChDir "O:\Distribution\Loadplan\1delsch"
ActiveWorkbook.SaveAs Filename:= _
"O:\Distribution\Loadplan\1delsch\delsch.xlsm", FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, ReadOnlyRecommended:=False,
CreateBackup:=False
Application.DisplayAlerts = True
ChDir "P:\Distribution\Schedule\Bracknell"
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"P:\Distribution\Schedule\Bracknell\Newdelsch.xls",
FileFormat:=xlExcel8, _
Password:="", WriteResPassword:="260959",
ReadOnlyRecommended:=False, _
CreateBackup:=False
Application.DisplayAlerts = True
ActiveWindow.Close