Carl Clements
Board Regular
- Joined
- Jun 13, 2008
- Messages
- 95
Hi,
I'm trying to write an Excel macro that Password protects a file for modification. However, I get the following error:
Run-time error '1004:
Operation failed. 'P:\(Drive location.....)' is write reserved
The macro is doing SaveAs - Tools - General Options - Password to modify - OK
The code is below:
ActiveWorkbook.SaveAs Filename:= _
"P:\Daily P&V\Clients\Cyrte & LODH\Cyrte & LODH AM 2.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="ldvt", ReadOnlyRecommended:= _
False, CreateBackup:=False
Can anybody advise what the problem is?
Thanks,
Carl
I'm trying to write an Excel macro that Password protects a file for modification. However, I get the following error:
Run-time error '1004:
Operation failed. 'P:\(Drive location.....)' is write reserved
The macro is doing SaveAs - Tools - General Options - Password to modify - OK
The code is below:
ActiveWorkbook.SaveAs Filename:= _
"P:\Daily P&V\Clients\Cyrte & LODH\Cyrte & LODH AM 2.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="ldvt", ReadOnlyRecommended:= _
False, CreateBackup:=False
Can anybody advise what the problem is?
Thanks,
Carl