title: Excel VBA - Use Application.Caller to get cell coords for an image
body: <p>I am trying to create a script that has a "delete tool" button. A tool will take up 5 rows. So, my code will delete the 5 rows when the X button is hit, and also will delete the X button because it is no longer necessary.</p>
  
  <p>The only issue I am having is how do I find the cell address of the picture that was clicked? Below is the code I have begun to use.</p>
  
  <pre><code>Sub DeleteRow()
  
      Dim Check As Integer
      Dim r As Range
      Dim m As Picture
      Dim strCallerTyp As String
  
      strCallerTyp = TypeName(Application.Caller)
  
      Select Case strCallerTyp
          Case "String"
              Check = MsgBox("Are you sure you want to remove this tool?", vbYesNoCancel, "Delete Tool")
              If (Check = 6) Then
                  MsgBox Sheets("sheet1").Shapes(Application.Caller).TopLeftCell '*THIS LINE*'
              End If
          Case "Error"
              MsgBox "Error"
      End Select
  End Sub
  </code></pre>
  
  <p>Why is this line (marked in code): </p>
  
  <p><code>MsgBox Sheets("sheet1").Shapes(Application.Caller).TopLeftCell</code></p>
  
  <p>opening a message box that says "Excel" instead of a coordinate?</p>
  
  <p>TIA!</p>