Hi,
I'm sure there is a simple solution, but I've been Googling this for almost an hour.
I need a macro to unprotect, then re-protect, a worksheet. The following doesn't seem to work:
Sub Unprotect ()
ActiveSheet.Unprotect Password: "my password typed here"
End sub
When I run the macro, the following error pops up:
Run-time error '1004'
Application-defined or object-defined error
I think I'm using Excel 2013.
I checked to make sure the password is correct a number of times, and also checked the correct sheet was being selected.
Many thanks
I'm sure there is a simple solution, but I've been Googling this for almost an hour.
I need a macro to unprotect, then re-protect, a worksheet. The following doesn't seem to work:
Sub Unprotect ()
ActiveSheet.Unprotect Password: "my password typed here"
End sub
When I run the macro, the following error pops up:
Run-time error '1004'
Application-defined or object-defined error
I think I'm using Excel 2013.
I checked to make sure the password is correct a number of times, and also checked the correct sheet was being selected.
Many thanks