+ Reply to Thread
Results 1 to 17 of 17

change values output by option/radio buttons

  1. #1
    Registered User
    Join Date
    11-05-2010
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    47

    change values output by option/radio buttons

    So i have a document with the form control option buttons. the 4 buttons are grouped in a Group Box. Whichever button the user selects will produce a value in a designated cell on a different sheet.

    Right now the 4 buttons will produce values of 1,2,3,4. Is there any way to change this to 0,1,2,3.

    If you could give me a general way instead of an exact macro i'd be appreciated as well, there's 29 sets of 4 radio buttons so i need to change the output values of all of them
    Last edited by cowboy713; 12-09-2010 at 06:47 PM. Reason: SOLVED

  2. #2
    Registered User
    Join Date
    11-05-2010
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: change values output by option/radio buttons

    It seems like the radio buttons are just assigning numbers to them in the order they were created, so they're all dump in 1,2,3,4,5,5,6,7,etc

    instead of 0,1,2,3
    0,1,2,3

    each set of 4 represents a value and the user will select None, Slight, Moderate, Severe
    so for each set of buttons when a selection is made 0,1,2, or 3 needs to be produced depending on which button was selected

  3. #3
    Registered User
    Join Date
    11-05-2010
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: change values output by option/radio buttons

    each set of 4 is in a group box, but somehow they are all still linked, the second one radio button is pressed the other is deselected. please anyone that can help this is turning into an nightmare

  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,258

    Re: change values output by option/radio buttons

    Hello cowboy713,

    Can you post your workbook for review? I'll be able to answer your questions faster that way.
    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
    11-05-2010
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: change values output by option/radio buttons

    I think I may have figured it out, I group the 4 first buttons and instead of creating new ones all together it made duplicates all that particular group when I was dragging the sheet down to fill it all in with buttons. I'll post in a short while if my solution isn't successful.

  6. #6
    Registered User
    Join Date
    11-05-2010
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: change values output by option/radio buttons

    I had it working briefly and now I can't anymore. At this point all I need to do is fill in the rest of the chart with the radio buttons, but have each group (set of 4 buttons) correspond to a separate cell on the last sheet.

    Also if you know how to change the values that the buttons give from 1,2,3,4 to 0,1,2,3 that would be very helpful as well, otherwise I was going to have them generate their values and then get the values I need in a separate set of cells
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-05-2010
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: change values output by option/radio buttons

    rows 13-42 need to have 4 option buttons for in b,c,d,e, is there anyway to populate those cells with the button groups without making a direct copy of the groups above? or do I have to manual enter 4 buttons, group box, group, move in space, each time??

  8. #8
    Registered User
    Join Date
    11-05-2010
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: change values output by option/radio buttons

    I made a makeshift solution.nvm...

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

    Re: change values output by option/radio buttons

    hello cowboy713,

    I have been working on a macro to do this. Here is what I have so far. It does create links to other cells though.

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    11-05-2010
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: change values output by option/radio buttons

    Nice. I've made a few design changes and am working on modifying the code now. We're adding None, Slight, Moderate, and Severe next to each button. I know I have to modify the
    OptBtn.Caption = "None, Slight, Moderate, Severe"
    But I'm not sure how to get it to assign 1 word to each button. The sizing can be standard, previous I had everything at 0.2" Height and 1" Width. I'm going to keep working on it for now.

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

    Re: change values output by option/radio buttons

    Hello cowboy713,

    The easiest way is to use an array. The column index "C" and then be used to pull the correct caption.
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    11-05-2010
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: change values output by option/radio buttons

    I keep getting an error, Run Time error '13': Type mismatch. Is there something in my data sheet not lining up correctly with the code perhaps?

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

    Re: change values output by option/radio buttons

    Hello cowboy713,

    Not your fault, it is mine - another typo. Change the line below...
    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    11-05-2010
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    47

    Thumbs up Re: change values output by option/radio buttons

    Thanks! Got it up and working, now the hardest thing is developing an interactive popout window lol. I may just use the workaround I had in place though, can''t have it all right?

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

    Re: change values output by option/radio buttons

    Hello cowboy713,

    Actually, I saw your other post. I am working on a UserForm to consolidate the SSQ Entry Data.

  16. #16
    Registered User
    Join Date
    11-05-2010
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: change values output by option/radio buttons

    Here's the current updated sheet. I did a slightly different way to format the buttons once they were set but everything on here is is formatted correctly with the input sheet.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    11-05-2010
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: change values output by option/radio buttons

    Quick question BTW, is there a way to lock the positioning of the groups and buttons so they I stop selecting them on accident and still make them hide-able? I changed them to don't move and now the "Hide" form button hides just the cells, dumb mistake. I'm guessing I'd have to add into the hide macro a function to change the status of the various groups and buttons to hidden status = true or something along those lines.
    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