Attach password to Button?
Mike, Try something like:
Sub MyMacro()
Dim pw as String
pw=inputbox("Enter password")
Select Case pw
Case "abcd","wxyz"
'execute your macro code
Case else
Msgbox "Invalid password"
Exit Sub
End Select
End Sub
James
mike wrote:
Seems like the simplest thing to do, but I can't find the first Google
result. I think all the results about protection are clogging up any
that might help me. I just want the user to be prompted for a password
before a certain macro runs.
Any suggestions welcome.
|