MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Unprotect using a macro


Posted by Duane Kennerson on November 20, 2000 5:46 PM

I keep getting a run time 1004 error message everytime
I run this macro:

activesheet.unprotect ("DAK")

The sheet is protected with the password "DAK" but excel
tells me that the unprotect method failed. Does anyone
have the answer???
Thanks in advance.


Posted by JAF on November 21, 2000 1:38 AM

This is one of those cases where if you record the macro, it doesn't record all the code.

The code you need is . . .
ActiveSheet.Unprotect Password:="DAK"

HTH
JAF

Posted by Duane Kennerson on November 21, 2000 3:51 PM

I'm still getting the "Unprotect method of Worksheet class failed" message. This is driving me crazy.
Any other suggestions???