Code to protect/unprotect a sheet using a macro with password
It wasn't totally clear from the above but I had the same issue where the sub
unprotect wouldn't work.
I realised it was because PW was only defined within "sub protect" but not
within "sub unprotect".
Fixed easily by defining PW within both subroutines.
|