+ Reply to Thread
Results 1 to 7 of 7

Macro to detect radio button selected and perform action based on selectoin

  1. #1
    Registered User
    Join Date
    08-26-2012
    Location
    Mayberry, NC
    MS-Off Ver
    Excel 2003
    Posts
    14

    Exclamation Macro to detect radio button selected and perform action based on selectoin

    I am having an issue getting the macro to recognize my 4 radio buttons that I have on my worksheet.

    This is my code as it stands right now, I am relatively new to Macro programming, so any help at all would be greatly appreciated.


    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 08-26-2012 at 03:37 AM. Reason: Added code tags, as per forum rules. Don't forget!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to detect radio button selected and perform action based on selectoin

    Click GO ADVANCED and use the paperclip icon to post up a copy of your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    08-26-2012
    Location
    Mayberry, NC
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro to detect radio button selected and perform action based on selectoin

    Here is the worksheet
    Attached Files Attached Files

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Macro to detect radio button selected and perform action based on selectoin

    Hello Kistler,

    This macro will copy the information to the other sheet when an OptionButton is selected. This macro is to be copied in the Worksheet's module for the worksheet that the option buttons are on.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  5. #5
    Registered User
    Join Date
    08-26-2012
    Location
    Mayberry, NC
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro to detect radio button selected and perform action based on selectoin

    Didn't work. Inserted that macro in and assigned it to my Submit button, but it did nothing. No copy, no paste, nothing. Was it to be assigned to each option button? Cause I am wanting to use a button for the copy/paste macro. The radio button will be selected first, then the input entered on screen, and then need the copy/paste to happen if can via a Button labeled Submit. This seems like such an easy job, yet it is baffling me. Either my code wont recognize which button and always paste same info, or works, but is not recognizing my radio buttons. Any more ideas here?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to detect radio button selected and perform action based on selectoin

    I think the intention was for you to assign that macro to all of your radio buttons.

    @LEITH, I would suggest code to "deselect" the Caller as well so that it there is no longer a radio button selected after the copy occurs.

  7. #7
    Registered User
    Join Date
    08-26-2012
    Location
    Mayberry, NC
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro to detect radio button selected and perform action based on selectoin

    Ok, once I figured out, via JBeaucaire, how you meant to implement this, it worked perfectly. Thanks for all your help.

+ 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