Password feature in command buttons

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
 
H

Harald Staff

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top