Hi future profi,
You hit the nail on the head! Application.Caller [link] can do what you need. While it can't detect what key combination was clicked, you don't need that information. It will return "Error" if the macro wasn't called by a shape object, range or formula.
If you check out the link from Microsoft, you'll even see a code snippet that you can drop into your password-protected macro.
Here is a bit of code you can study. It includes the snippet:
Public Sub ButtonClick()
Dim v As String
Select Case TypeName(Application.Caller)
v = Application.Caller.Address
v = Application.Caller
v = "Error"
v = "unknown"
MsgBox "caller = " & v
Private Sub AskForPassword()
' Your code for getting password
Dim Guess As String
Guess = InputBox("Enter Password", "Halt! Who Goes There?")
If Guess = "Open Sesame" Then
MsgBox "Accessed Denied! Be Gone!", vbCritical, "Unauthorized Attempt"
Private Sub ProtectedMacro()
MsgBox "You're In", vbInformation + vbOKOnly, "Secret Passage"