Excel VBA Protection/Unprotection
Posted by David Polen on March 06, 2000 2:35 PM
I'm trying to use VBA to unprotect a protected worksheet, make some changes, then reprotect it (mostly because I can't add/delete comments to ANY cells - even unlocked ones - when the worksheet is protected).
Unfortunately, invoking the Protect method for a Worksheet object seems always to produce the following error:
'Protect method of worksheet class failed.'
I get this error even in isolation when I create a new workbook, put a button on Sheet 1, and specify "ActiveSheet.Protect" as the only code in the
button's Click method.
Can anyone help?