ESC key bypasses password check!

  • WHILE the message box is open ready to receive the password and the

    [SIZE=13px]ESC key is pressed instead of entering the password; whala! the worksheet opens unprotected! Is there a way to disable the ESC key in a macro. I have tried many ways and they don't work!


    [/SIZE]

    Code
                    Sub Password_Check()
                    On Error GoTo Message
                    Sheets("Program").Unprotect
                    Exit Sub
                   Message:
                   MsgBox "BAD PASSWORD = STRIKE ONE"
                   Application.Run "Password_Check2"
                   End Sub
  • is the user trying to enter a password to unprotect the sheet?
    Please provide your spreadsheet, (without sensitive data!)

  • Hello Rapsofty!


    YES I am trying to enter a password to unprotect a sheet. When the password window shows up, instead of entering the password I hit ESC, the password message goes away and the sheet becomes UNPROTECTED!


    I isolated the problem in a very small spreadsheet with two macros. The first macro with a button calls for the second macro which begins the procedure to enter a password. But a few days ago by mistake I hit the ESC key; the sheet became unprotected! Since then I been trying to find a routine to TRAP the action on the ESC key pressed and manage it, but nothing works! If you are really interested in solving this problem create a spreadsheet with the two macros I described above. There are loads of people looking for this fix and none of the fixes published work!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!