Worksheet.Protect Question

D

Dusan

Hi there,
I was experimenting with ActiveSheet.Protect function and
ran the following piece of code:

ActiveSheet.Protect True , True

then I was happy that the sheet was locked but when I tried
to run:

ActiveSheet.Protect False,False

to unlock the sheet got the message saying wrong password.

Now I can't unlock it. Do you know the exact syntacs of the command?
I tried several passwords (thought that "True" was the pasword parameter)...
but nothing helped.

Is there any default pasword? Sounds silly but any idea?

Cheers
Dusan
 
E

Eric

Dusan,

I thought the syntax was "Activesheet.protect(password)" and "Activesheet.unprotect(password)". Maybe you're using a different version, or maybe this is the problem.

Also, it might be interpreting the password as the logical value True when you lock it, and then interpreting it as the string "True" when you try to unlock it. Maybe try the password = 1 (the value of TRUE)?

Eric
 

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