Password feature in command buttons

  • Thread starter Thread starter Marvin Moore
  • Start date Start date
M

Marvin Moore

Hi

I would like to incorporate a password utility in my
command button. The purpose is to allow only authorized
users to activate the macro. I was thinking of a MsgBox
to popup and ask the user to enter a password and, if
correct, the macro will activate otherwise nothing should
happen.

thanks
 
Sub test()
If InputBox("Password:") <> "Brilliant" Then Exit Sub
MsgBox "Code is running fine", vbInformation
End Sub
 
Back
Top