How do I unprotect a sheet within a macro?
Worksheets("Template").Unprotect Password:="MyPassword"
Worksheets("Template").Protect Password:="MyPassword"
Mike F
"Mick" wrote in message
...
Please can anyone advise how I can overcome this Run-time error when using
the code
below:
"Unprotect method of worksheet class failed"
Worksheets("Template").Protect Password:="MyPassword"
Or what code should I use to remove a password format a sheet using
another
macro and put the same password back on again.
--
Kind Regards
Mick
|