Worksheet.Protect Question

  • Thread starter Thread starter Dusan
  • Start date Start date
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
 
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
 
Back
Top