Overwrite write reserved file with updated copy (same name; also write reserved)
Is it possible to use VBA to overwrite a file previously saved as read only with an updated copy (same name), also as read only?
Also posted at the following due to user interface problems:
http://www.vbaexpress.com/forum/show...431#post304431
"Run-time error '1004': Operation failed. \\mgadmdat\public\Reliability & Engineering Services\Workshop and Fabrication Service\Fabrication\ISO 9001\Contractors Score Card\Archive\Fabrication Contractor Score Card (2011 - 2012).xls' is write reserved.
I.e. "Operation failed. 'FullFileName.xls' is write reserved."
I get this error when I am trying to overwrite the existing file with the following code:
(Note: The code must also work when there are no previously saved copy)
Dim NewBookName As String
NewBookName = Range("FabConSCFFN").Value
ActiveWorkbook.SaveAs FileName:=NewBookName, _
FileFormat:=xlNormal, _
PassWord:="", _
WriteResPassword:=WagWoord, _
ReadOnlyRecommended:=True, _
CreateBackup:=False
I appreciate your time,
Best Regards
Bookmarks