Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2010 Password Protection Issues - What is Protected View? 1

Status
Not open for further replies.

shelby55

Technical User
Jun 27, 2003
1,229
CA
Hello

I'm trying to use password to protect my worksheets and if I enter the password as "password" then it works fine. But if I change and use something else then I get the message "the password you supplied is not correct. Verify that the CAPS lock key is off and be sure to use the correct capitalization."

I've changed the password numerous times and even copied and pasted it when prompted but still get the same error. I read that it may be related to the Protected View in Office 2010 but can't seem to find out how to get around it.

Any and all assistance greatly appreciated.
 
Hi

Thanks Skip...but then any idea why it's not working? To see about fixing some of the issues I'm having with protect and unprotect on the other thread, I followed Hoaokapohaku's advice and added the protect/unprotect as a Workbook_Open event. So after I've run the abstracts and saved the document then everything is locked as I wish and the code is only in one place.

But, as mentioned, I get an error if I use anything other than "password".
Code:
Private Sub Workbook_Open()
Dim wSheet As Worksheet
For Each wSheet In Worksheets
wSheet.Protect Password:="password", userinterfaceonly:=True
wSheet.Range("J5:J37").Locked = False
Next wSheet

End Sub

So when I open up the document and the password is applied (if not "password") then I get the error message of "the password you supplied is not correct. Verify that the CAPS lock key is off and be sure to use the correct capitalization." I was using punctuation and numbers in the original but even just changing to all text doesn't fix the problem. Any ideas?


 
So what password did you attempt to apply, that was rejected?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 

Ran no problem in 2007, starting with UNPROTECTED SHEETS..
Code:
Private Sub Workbook_Open()
    Dim wSheet As Worksheet
    For Each wSheet In Worksheets
        wSheet.Protect Password:="Jbhproject", userinterfaceonly:=True
        wSheet.Range("J5:J37").Locked = False
    Next wSheet

End Sub
I see nothing in 2007-2010 change comparisons that would indicate a change in sheet protection.



Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hi

That was it, it was starting as protected so I had to unprotect everything, save like that including the workbook_open event and now it's fine.

Thanks for your help.
 
I see that you...
Code:
 The
[highlight red]     [/highlight]     
Lines
[upsidedown]

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top