how to overwrite a write reserved file?

J

john_t_h

I am running a macro to save a spreadsheet to a common drive. Th
spreadsheet is write protected via a password.

When I go to update the file the macro returns an error as the file i
write reserved. Is there someway I can override this so the ne
version will overwrite the old one.

This is the code I am using to save it


Code
-------------------

ChDir "G:\COMMON\FILES"
ActiveWorkbook.SaveAs FileName:= _
"G:\COMMON\FILES\myfile.xls", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="mypass", ReadOnlyRecommended:=True, _
CreateBackup:=False
 
Top