+ Reply to Thread
Results 1 to 12 of 12

Radio Buttons

  1. #1
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Radio Buttons

    Hi all, lets say I have 3 radio buttons. Lets also say that I have 5 text boxes that rely on the radio button that is selected. How would I code the text boxes to couple the selection made by the radio button tick?
    Last edited by Mordred; 01-17-2011 at 08:37 PM.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Radio Buttons

    On a worksheet, on a form?

    If on a worksheet, buttons from where?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Radio Buttons

    On a form.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Radio Buttons

    Use the click events for the option buttons.
    Last edited by shg; 01-07-2011 at 04:19 PM.

  5. #5
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Radio Buttons

    I understand how to use click events but I am thinking very circular for some reason. The user would choose a radio button option and then enter up to 1 number for up to 5 different text boxes. How would the text boxes know which radio button was selected?

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Radio Buttons

    You have three option buttons and one to five text boxes. Somehow the state of the option buttons affects the text boxes -- or not, because you type in the text boxes ...

    I'm missing some minor details ...

    How would the text boxes know which radio button was selected?
    They don't have a clue. You need to implement the logic in code.

  7. #7
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Radio Buttons

    Radio button options:
    1) Month
    2) Quarter
    3) Annual

    Text boxes:
    I want the user to enter a number from 1 to 37 per one text box. The user will only be able to enter a maximum of 5 numbers (5 text boxes) as I am hoping to link their inputs to a chart(but I need to take baby steps here).
    Its the logic end where I am thinking circular. The outputs (for the chart) from the text box selections are dependant upon the radio button that is ticked. Is this making a little more sense? I'm reading this and even I am confused at what I am saying.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Radio Buttons

    You need to think through what you're trying to do. I can't help with that part.

    Maybe 1 to 37 means, depending on the option buttons, plot the last N months, N quarters, or N years.

  9. #9
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Radio Buttons

    In the following link, I have uploaded a workbook. If you were to look at the sheet called "Graphs", you would see that I have many graphs made using data from the worksheet "Monthly". While this approach works, I would have to make (because of the user) 2 more sheets so that I could apply the data from worksheets "Quarter" and "Annual". So there would be 3 sheets with 14 charts per sheet.

    I was hoping to have a form, which could be used to select the data the user wants, from one of the 3 sheets (Monthly, Quarterly, or Annual). There would be 2 charts that would output the user's selection. I have created a non-working form in the sheet called "Charts" to show what I want to do. The upload has 2 charts within the form but it seems that that kind of charting (a chart within a form) is a web based application.

    Is my logic a little more clear on this attempt at an explanation? I think it might be but please let me know.

    http://www.excelforum.com/excel-char...-in-forms.html

  10. #10
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Radio Buttons

    Mayhap I should go against the current on this given that it is just a concept. I've attached a jpeg to this so that people don't have to open a whole workbook. In the form the user selects a radio button. In the series part of the form, they choose a number based on the index given on the right side of the form. Each index will have 5 years worth of data to be displayed. Once they hit enter, the two charts should be generated. I forgot to add a scroll bar that would sit over the top of the chart. It would be there if the user chooses Month in their radio button selection (because there is a lot of data to display with 5 years of monthly data).
    Attached Images Attached Images

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Radio Buttons

    I would find it more intuitive in the Industry Index list were buttons. Click one, it highlights the same color as the 1st series. Click another and another and another, ditto for the 2nd through 4th series. Click a 5th, it tells you to reset all buttons or stop screwing around.
    Last edited by shg; 01-07-2011 at 07:18 PM.

  12. #12
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Radio Buttons

    Thanks shg, I thought about using them as buttons but what worried me was the fact that the user would screw around and try to enter too many for a chart. I know what I am going to be doing for the weekend.

+ 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