Password on Macro Button
A VERY simple password [password = HELLO] that is VERY unprotected would be...
'/========================================/
Sub MyMacroButton()
If SimplePassword(InputBox("Enter Password: ")) Then
'put code here
Else
Exit Sub
End If
End Sub
'/========================================/
Private Function SimplePassword(strAnswer As String) As Boolean
If UCase(strAnswer) = "HELLO" Then
SimplePassword = True
End If
End Function
'/========================================/
--
Hope this helps.
Thanks in advance for your feedback.
Gary Brown
"scuba" wrote:
Is it possible to have a macro assigned to a macro button that when the
button is selected it will ask for a password before the macro will run?
|