Selecting a Drawing Object

  • Thread starter Thread starter Troubled User
  • Start date Start date
T

Troubled User

I need to get the name of a drawing object when I click it via a left click,
something like:

Sub TheDrawingObject

msgbox(me.name)

End Sub

I need to assign it to a variable. Any help would be greatly appreciated.
 
Option Explicit
Sub TheDrawingObject()
Dim myShape as shape
set myshape = activesheet.shapes(application.caller)

'just to show a few ways to get it and other options
msgbox application.caller _
& vblf & myshape.name _
& vblf & myshape.topleftcell.address

End sub
 
Back
Top