View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Ray Ray is offline
external usenet poster
 
Posts: 267
Default more than 2 option buttons on a form

On Feb 25, 9:13 pm, Dave Peterson wrote:
I'd hide all 4 of the graphs.

Then use the option buttons to decide which one to show.



Ray wrote:

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


--

Dave Peterson


Is there some kind of parameter I can set on each chart to hide them
by default? and if so, when the user changes graphs, would the
previously unhidden graph become hidden again automatically?