![]() |
Identifying the selected Shape
I have lots of buttons on a sheet. They all start the same sub. How can
I tell which button was clicked? I'd like to get the underlying row. I see the TopLeftCell method, but I don't know how to tell which is the selected Shape. Thanks for helping; Jerry |
Identifying the selected Shape
Try:
Sub GetTopLeftCell() With ActiveSheet.Shapes(Application.Caller) MsgBox .Name & vbCr & .TopLeftCell.row End With End Sub Regards, Greg "Jerry" wrote: I have lots of buttons on a sheet. They all start the same sub. How can I tell which button was clicked? I'd like to get the underlying row. I see the TopLeftCell method, but I don't know how to tell which is the selected Shape. Thanks for helping; Jerry |
All times are GMT +1. The time now is 09:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com