View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
john_t_h[_13_] john_t_h[_13_] is offline
external usenet poster
 
Posts: 1
Default how to overwrite a write reserved file?

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

-------------------


--
Message posted from http://www.ExcelForum.com