Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detect which shape was clicked?
IF I have 3 autoshapes, rectangles, on a worksheet, how do I detect which
shape was clicked by the user so that I can, say, delete it or change its properties? -- | +-- Thief_ | |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detect which shape was clicked?
"Thief_" wrote in message
... IF I have 3 autoshapes, rectangles, on a worksheet, how do I detect which shape was clicked by the user so that I can, say, delete it or change its properties? If you assign the same macro to all of them, Application.Caller will return the name of the shape that fired the macro. You can then use Worksheets("Whatever").Shapes("CallerName") to get an object reference to that shape. -- Rob Bovey, Excel MVP Application Professionals http://www.appspro.com/ * Take your Excel development skills to the next level. * Professional Excel Development http://www.appspro.com/Books/Books.htm |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
enter time when shape is clicked | Excel Discussion (Misc queries) | |||
How can I detect that an excel cell has been clicked | Excel Discussion (Misc queries) | |||
How to detect optionbutton being clicked? | Excel Programming | |||
How to tell wich object/shape was clicked | Excel Programming | |||
detecting shape clicked on | Excel Programming |