Protecting Sheet

S

Stuart

If I protect a sheet with the following line.

ActiveSheet.Protect password = "qwerty"

Why can't I unProtect the sheet manually from
"Tools>Protection>UnprotectSheet" then typing in the the same password?

Same ViceVersa

If i protect the sheet manually with the password "qwerty" why does the
following line cause an error

ActiveSheet.Unprotect password = "qwerty"
 
P

Paul B

Stuart, try this, note the : after password

ActiveSheet.Protect password:="qwerty"

ActiveSheet.Unprotect password:="qwerty"



--
Paul B
Always backup your data before trying something new
Using Excel 2000 & 97
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
 
G

Gord Dibben

Stuart

I have no problem protecting via macro and unprotecting via Tools menu.

Are you positive the password you enter in either case is the same?

Do not use the quote marks when typing in the password manually.

Gord Dibben XL2002
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top