Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
more than 2 option buttons on a form
When I have two option buttons on a form, I define a range as a ControlSource
in the property of the first one, and the TRUE/FALSE of that range allows me to define which button is chosen. Can you tell me what I need to do when I have 4 option buttons and the user is to choose only one at the time (mutually exclusive). How can I track which one has been chosen on the form. Any help is greatly appreciated Thanks -- caroline |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
more than 2 option buttons on a form
on the userform insert a FRAME. then move all your option buttons
into the frame. it will automatically group them all together & only allow one to be chosen. hth susan On Feb 20, 1:45 pm, caroline wrote: When I have two option buttons on a form, I define a range as a ControlSource in the property of the first one, and the TRUE/FALSE of that range allows me to define which button is chosen. Can you tell me what I need to do when I have 4 option buttons and the user is to choose only one at the time (mutually exclusive). How can I track which one has been chosen on the form. Any help is greatly appreciated Thanks -- caroline |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
more than 2 option buttons on a form
i forgot to answer part II to your question.......
then in your code you have to have "if" statements which check each option button to see which one was selected. susan On Feb 20, 1:45 pm, caroline wrote: When I have two option buttons on a form, I define a range as a ControlSource in the property of the first one, and the TRUE/FALSE of that range allows me to define which button is chosen. Can you tell me what I need to do when I have 4 option buttons and the user is to choose only one at the time (mutually exclusive). How can I track which one has been chosen on the form. Any help is greatly appreciated Thanks -- caroline |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
more than 2 option buttons on a form
Thanks.
I did not realise that the code could refer directly to the name of the button:) If OptionOne Then if OptionTwo Then -- caroline "Susan" wrote: i forgot to answer part II to your question....... then in your code you have to have "if" statements which check each option button to see which one was selected. susan On Feb 20, 1:45 pm, caroline wrote: When I have two option buttons on a form, I define a range as a ControlSource in the property of the first one, and the TRUE/FALSE of that range allows me to define which button is chosen. Can you tell me what I need to do when I have 4 option buttons and the user is to choose only one at the time (mutually exclusive). How can I track which one has been chosen on the form. Any help is greatly appreciated Thanks -- caroline |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
more than 2 option buttons on a form
while a frame works, it is not required. You can use the group name property
of each option button and put in a common name. It doesn't make any difference what one word you use as long as it is unique to those 4 option buttons. -- Regards, Tom Ogilvy "caroline" wrote: Thanks. I did not realise that the code could refer directly to the name of the button:) If OptionOne Then if OptionTwo Then -- caroline "Susan" wrote: i forgot to answer part II to your question....... then in your code you have to have "if" statements which check each option button to see which one was selected. susan On Feb 20, 1:45 pm, caroline wrote: When I have two option buttons on a form, I define a range as a ControlSource in the property of the first one, and the TRUE/FALSE of that range allows me to define which button is chosen. Can you tell me what I need to do when I have 4 option buttons and the user is to choose only one at the time (mutually exclusive). How can I track which one has been chosen on the form. Any help is greatly appreciated Thanks -- caroline |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
more than 2 option buttons on a form
Drats! foiled again!
:) susan On Feb 20, 2:38 pm, Tom Ogilvy wrote: while a frame works, it is not required. You can use the group name property of each option button and put in a common name. It doesn't make any difference what one word you use as long as it is unique to those 4 option buttons. -- Regards, Tom Ogilvy "caroline" wrote: Thanks. I did not realise that the code could refer directly to the name of the button:) If OptionOne Then if OptionTwo Then -- caroline "Susan" wrote: i forgot to answer part II to your question....... then in your code you have to have "if" statements which check each option button to see which one was selected. susan On Feb 20, 1:45 pm, caroline wrote: When I have two option buttons on a form, I define a range as a ControlSource in the property of the first one, and the TRUE/FALSE of that range allows me to define which button is chosen. Can you tell me what I need to do when I have 4 option buttons and the user is to choose only one at the time (mutually exclusive). How can I track which one has been chosen on the form. Any help is greatly appreciated Thanks -- caroline- Hide quoted text - - Show quoted text - |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
more than 2 option buttons on a form
On Feb 20, 4:01 pm, "Susan" wrote:
Drats! foiled again! :) susan On Feb 20, 2:38 pm, Tom Ogilvy wrote: while a frame works, it is not required. You can use the group name property of each option button and put in a common name. It doesn't make any difference what one word you use as long as it is unique to those 4 option buttons. -- Regards, Tom Ogilvy "caroline" wrote: Thanks. I did not realise that the code could refer directly to the name of the button:) If OptionOne Then if OptionTwo Then -- caroline "Susan" wrote: i forgot to answer part II to your question....... then in your code you have to have "if" statements which check each option button to see which one was selected. susan On Feb 20, 1:45 pm, caroline wrote: When I have two option buttons on a form, I define a range as a ControlSource in the property of the first one, and the TRUE/FALSE of that range allows me to define which button is chosen. Can you tell me what I need to do when I have 4 option buttons and the user is to choose only one at the time (mutually exclusive). How can I track which one has been chosen on the form. Any help is greatly appreciated Thanks -- caroline- Hide quoted text - - Show quoted text - Good stuff .... but a follow-up question... Let's say I want to use the 4 option-buttons to choose which graph to display, with the non-selected graphs being hidden. How would I write the code to do this? Is it as straight-forward as: if optionone then Show graph1 Hide graph2 Hide graph3 Hide graph4 if optiontwo then Show graph2 Hide graph1 Hide graph3 Hide graph4 and so on... OR, if there a simpler way to do this? TIA, Ray |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
form option buttons - how can I make them accessible? | Excel Discussion (Misc queries) | |||
Option Buttons in a Form | Excel Discussion (Misc queries) | |||
Creating a form with option buttons | Excel Programming | |||
option buttons in a form | Excel Programming | |||
2 sets of option buttons on one user form? | Excel Programming |