Assigning multiple shapes to macro.

B

ben

At run-time, various Auto-Shapes are added and deleted, and bulk assigned to
one macro. Is there any way to determine which auto-shape called the macro?
Eg. was it Shape1,Shape2,Shape3, etc...
 
T

Tom Ogilvy

use the caller property

Sub Generic_click()
Dim sName as String, shp as Shape
sName = Application.Caller
set shp = ActiveSheet.Shapes(sName)


end Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top