I am using the following code to protect a macro via a password.
It works fine under most conditions except when the user cancels
the macro and it gets an error code "Error Runt-time 2001" and they can hit the "debug" button, which I don't want... How can I take care of this?
ALso, the password is not clearing out =HELP!
Private Sub cmdOK_Click()
If Me.txtPassword = "LM" Then
MsgBox "Thank you. Have a Nice Day"
Me.Visible = False