+ Reply to Thread
Results 1 to 6 of 6

How to know which macro button has been selected

  1. #1
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    How to know which macro button has been selected

    Hi,

    I have a workbook contains many macro buttons to filter data. Since there are more than 10 macro buttons, I wonder if there is a way that when you pressed a macro button, you will know that macro button is selected. Please let me know if you have a trick to do that.

    Thanks

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to know which macro button has been selected

    Hi tantcu

    I'm certainly no expert in this particular subject but, yes, there is a way to determine which Button has been selected. Are these Buttons on your Worksheet or in a UserForm?

    If on a Worksheet, go into Design Mode, right click on the Button and tell me what they look like...

    Do they look like this
    From Form Controls.jpg

    or this
    From Activex Controls.jpg
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: How to know which macro button has been selected

    Hi I have something like this. I just want to know if somebody clicked on this, they know what button is clicked.Macro Button.PNG

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to know which macro button has been selected

    Hi tantcu

    That doesn't tell us what kind of Buttons your dealing with...are they Forms Control or ActiveX Control?

    If on a Worksheet, go into Design Mode, right click on the Button and tell me what they look like...

  5. #5
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: How to know which macro button has been selected

    It's a form control. Sorry I was not clear about this.

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to know which macro button has been selected

    Hi tantcu

    I'm not certain what you're trying to do...play with the attached...see if it helps.
    Attached Files Attached Files

+ 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