View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_2_] Nigel[_2_] is offline
external usenet poster
 
Posts: 735
Default Password To Run Macro?

Before your code runs, ask the user for an input, simplest to use an
InputBox then validate the entry against a stored value (password)

simple example......

If InputBox("Enter password to run") < "MyPassword" Then
MsgBox "Wrong password"
Exit Sub
End If
' rest of your code

--

Regards,
Nigel




"garyh" wrote in message
...
Is there a way to request a password when a macro button is clicked? I
would like to 'lock' down the macros.

Thanks.

G