unprotect in vba


Posted by Anna Schramm on February 13, 2002 10:42 AM

I have vba code that unprotects the active sheet. When I call this code from the on activate event it works perfectly but if I call the code from the macro attached to a command button on the protected worksheet I get an error message.

Posted by Juan Pablo G. on February 13, 2002 11:55 AM

Set the TakeFocusOnClick property to False or put this at the top of your macro

ActiveCell.Select

Juan Pablo G.

Posted by anna schramm on February 14, 2002 6:28 AM

Thank you very much
Anna



Posted by mario on March 07, 2002 3:35 AM

does anybody have the unprotect/protect code
in vb for me too?

thank in advance

: Set the TakeFocusOnClick property to False or put this at the top of your macro