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

Dim stDocName As String

stDocName = "macroProductsLM"
DoCmd.RunMacro stDocName

Exit Sub

MsgBox Err.Description
Resume Exit_cmdOK_Click

MsgBox "SORRY"
End If

End Sub