Password protect a macro

jason2885

Registered User.
Local time
Yesterday, 23:27
Joined
Jun 18, 2007
Messages
99
I have a button in a form that runs a macro. I need to somehow password protect that button. How could I go about doing that.
 
One way:

Code:
If InputBox(...) = "password" Then
  'run macro
Else
  Msgbox "Wrong password"
End If

See VBA Help for more info on InputBox if needed.
 

Users who are viewing this thread

Back
Top Bottom