S
skid812pb
Is there a way to automaticlly assign a macro to and autoshape object in VB,
if there is Could some please help. Thanks.
if there is Could some please help. Thanks.
Dave Peterson said:You're assigning the same macro to various shapes and want to determine which
shape was clicked on to start the macro?
If yes, then you can use Application.caller to get the name of the shape. And
you can find out more about the shape, too:
Option Explicit
Sub testme()
Dim myShape As Shape
MsgBox Application.Caller
Set myShape = ActiveSheet.Shapes(Application.Caller)
With myShape
MsgBox .Name & vbLf & .TopLeftCell.Address
End With
End Sub