+ Reply to Thread
Results 1 to 19 of 19

Radio button grouping

  1. #1
    Registered User
    Join Date
    05-05-2011
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    35

    Radio button grouping

    I have some issues grouping radio buttons.

    1. I have grouped the radio buttons , but somehow it fails to take the grouping I made, it keeps changing, so i end up getting incorrect values . For Ex: If I had given D7, it changes to D10 automatically.

    Any idea why the grouping changes?

    2. Also in Row 7 , there are more than one selection checked , which should not be the case, it should select only one option.

    I have attached the excel to it. Can someone help me please?
    Attached Files Attached Files
    Last edited by shilloh; 06-03-2011 at 11:13 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Radio button grouping

    Hi shilloh
    delete the problem check boxes as they are copies , add new one from the tool box dont copy and paste
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    05-05-2011
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Radio button grouping

    Hello it works great after the changes suggested .Thank You

    Another question : Do you have an idea how to disable entry of cells based on a specific value?

    Example;on the same sheet attached If E15 is > 30 then rows 17, 18, 19, 20 which contains these radio buttons should be disabled from making an entry.

    Is it possible?


    Quote Originally Posted by pike View Post
    Hi shilloh
    delete the problem check boxes as they are copies , add new one from the tool box dont copy and paste

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Radio button grouping

    Hi shilloh
    I would change the button to "Active X controls"
    Then you can add code to enable other button when clicked
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-05-2011
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Radio button grouping

    Hi Pike

    Thanks for your reply.

    So should I convert all the radio buttons to Active X controls? Will the CHOOSE function work on forms?

    Is this code right? I was trying to figure out if I can write a macro for forms

    Please Login or Register  to view this content.
    Last edited by shilloh; 06-01-2011 at 06:28 AM. Reason: code tags

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Radio button grouping

    Hi shilloh,
    First .. Can you please edit you last post and use code tags with the code.
    with the active x controls you could make the choose work or even pass the value to the cell when the button is clicked.
    shapes dont have and enabled property
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    05-05-2011
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Radio button grouping

    Hello Pike

    Im trying to add radio buttons inside the frame (Active x controls) , but when I exit the design mode the radio buttons do not appear. What is that im missing? Any Idea?

    pls reply!

    Thanks
    Shilloh
    Attached Files Attached Files

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Radio button grouping

    Hi
    It gets tricky

    user the forms frame
    and set each grouped option button "Groupname" property
    The first groupname is "sheet1"
    have a look at the attachment
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    05-05-2011
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Radio button grouping

    Hi Pike

    Super, It works great. I worked out just like u guided.

    However , a small change in this , I have a cell(not a option button click) (E11) which is a sum(E1:E10). If E11 >= 30 I want certain option buttons to be disabled, I dont know how to do this

    Can you pls help me?

    To detail it better

    If D17<= 30 , then option buttons in row 19, 20, 21,22 shd be disabled. It shd also not consider D23 value but compute D25 directly with the SUM Part A value.

    Pls see the attached sheet!
    Attached Files Attached Files
    Last edited by shilloh; 06-02-2011 at 09:28 AM. Reason: Adding attachment

  10. #10
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Radio button grouping

    Hi shilloh

    Maybe
    Please Login or Register  to view this content.
    also instead of the shapes (which you can move) to cover all the cells you can lock the cells then protect the sheet

  11. #11
    Registered User
    Join Date
    05-05-2011
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Radio button grouping

    Hello Pike

    That works out so well. Thankyou very very much.
    But something inbetween went wrong. Now the radio buttons are functioning in a different way. It doesnt work based on group now. Im so worried. I havent changed anything but this acts strange.
    I checked the property, but its all fine. Please help me as I dont have enough time


    URGENT PLS...Awaiting ur reply

    Look at the attachment pls
    Attached Files Attached Files

  12. #12
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Radio button grouping

    shilloh
    you have to set the Option button Property "GroupName" for each group

  13. #13
    Registered User
    Join Date
    05-05-2011
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Radio button grouping

    Got it Pike. Thankyou again!

  14. #14
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Radio button grouping

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  15. #15
    Registered User
    Join Date
    05-05-2011
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Radio button grouping

    Attached is the excel sheet !
    Attached Files Attached Files

  16. #16
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Radio button grouping

    but is not like the described problem??

  17. #17
    Registered User
    Join Date
    05-05-2011
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Radio button grouping

    Hello Pike

    Sorry for the confusion caused.

    Here are the details.

    Referring to the excel sheet projcom_updated_xxx , cell D21 has a formula (SUM(D17:D20) . This formula should be in effect only when Row 17,18,19,20 are enabled. When they are disabled , the cell D21 should have a 0 automatically. Hence only Part A value is considered for Total(Part A + Part B)in cell D23.

    Is it possible?

    I tried giving
    Please Login or Register  to view this content.
    but it did show a 0; but closed down the excel sheet.

    Kindly guide me how to work this out.

    -shilloh

  18. #18
    Registered User
    Join Date
    05-05-2011
    Location
    germany
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Radio button grouping

    Hello Pike

    sorry for the confusion caused.

    Referring to this above attachment. Cell D21 already has a formula SUM(D17:D20) , however I require this to be in effect only when the option buttons in Rows 17, 18, 19, 20 are enabled, otherwise when they are disabled I would like a value "0" to be taken in cell D21. Hence Part A+Part B CellD23 will consider only Part A value, Part B value being 0.

    I tried this code
    Please Login or Register  to view this content.
    but it works but closes down the sheet.

    Can you pls guide me on how to work this out?

    Thanks

  19. #19
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Radio button grouping

    shilloh
    but Range("D17").Value <= 30 determines the enabling?
    I dont under stand how the example worksheet works .. it errors on opening untill you change the sheet name
    try in D21
    =IF(D17<=30,SUM(D17:D20),0)

+ 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