Hi there,
checked the forum for similar situations but was not able to find something similar where I could start from...
So:
I have a protected workbook with a password ("pass1" for example); for locking I use a button with as simple code, the unlocking part is where I need help.
1- When I click on the "unlock" button, the excel "enter password" box pops up and you enter the password.
2- if it's Ok, then it displays the message "Sheet Unprotected", if the password is false it goes "Wrong password".
The code looks like this:
The problem:
If one clicks on the cancel or close button in the "enter pass" pop up window, then the "Sheet Unprotected" message comes up - which of course is not true.
The idea is (but don't know to write the proper code):
1. If you enter the right password, then display the message "Sheet Unprotected".
2. If you enter the wrong pass, then display "Wrong password"
3. If you either close the window or click cancel, the just close the window, no need for a pop up message.
I would be really grateful for any suggestions.
Bookmarks