+ Reply to Thread
Results 1 to 2 of 2

Identifying the selected Shape

  1. #1
    Jerry
    Guest

    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


  2. #2
    Greg Wilson
    Guest

    RE: 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
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1