Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 183
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 183
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default 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   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 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

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default more than 2 option buttons on a form

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
  #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?

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default more than 2 option buttons on a form

No setting that I know of.

I'd hide all the charts first:

Hide graph1
Hide graph2
Hide graph3
Hide graph4

'and you'd still have to show

if optionone then
Show graph1
elseif optiontwo then
....



Ray wrote:

<<snipped
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?


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
form option buttons - how can I make them accessible? lynn Excel Discussion (Misc queries) 1 February 10th 10 02:59 PM
Option Buttons in a Form Idaho Word Man Excel Discussion (Misc queries) 7 April 21st 08 09:58 PM
Creating a form with option buttons Jon[_21_] Excel Programming 3 April 15th 06 03:15 AM
option buttons in a form raw[_11_] Excel Programming 0 November 11th 05 10:05 PM
2 sets of option buttons on one user form? Pal Excel Programming 3 April 28th 04 02:45 PM


All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"