How does the user execute the macro? If by clicking a button then in the code
behind the button don't put the macro, instead put the following:
Sub VarifyPWD()
Dim Pwd As String, PwdEntered As String
Pwd = "MyPassword" ' Modify to your chosen password
PwdEntered = InputBox("Please enter password.")
If UCase(PwdEntered) = UCase(Pwd) Then
macro1 'enter the the name of the macro here
Else
MsgBox "Password not valid!", vbCritical
End If
End Sub
In the above code the password will not be case sensitive, if you want the
password to be case sensitive then skip the UCase function
You could create a userform and the textbox which will be used as the
password input, you can asign password charcters like *, so that other people
cannot see what the user enters.
Hope this helps