Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default optionbutton - three options

I have optionbuttons 'Pass' and 'Fail'. Using conditional formatting one
turns the adjacent cell green and the other red (ie condition is 'if the
optionbutton-linked cell contains TRUE turn green, if FALSE turn red')
Users being users, someone will click an optionbutton by mistake before the
test has been run. I want to add a third optionbutton 'Not Tested' which
will reset the adjacent cell colour.
So I either need a way to return, say, a number from my optionbuttons rather
than TRUE/FALSE or some other way round it. Is the key the TripleState
property? Does anyone have any ideas?
The worksheet can potentially contain results for hundreds of tests so I
REALLY don't want to start writing code. It's big enough as it is.
Ideas greatly appreciated! Sian
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default optionbutton - three options

If you have 3 optionbuttons from the forms toolbar, all linked to the same
cell, they will set that value to 1, 2 or 3 depending upon which button is
clicked.

You can test that in your CF.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Sian" wrote in message
...
I have optionbuttons 'Pass' and 'Fail'. Using conditional formatting one
turns the adjacent cell green and the other red (ie condition is 'if the
optionbutton-linked cell contains TRUE turn green, if FALSE turn red')
Users being users, someone will click an optionbutton by mistake before
the
test has been run. I want to add a third optionbutton 'Not Tested' which
will reset the adjacent cell colour.
So I either need a way to return, say, a number from my optionbuttons
rather
than TRUE/FALSE or some other way round it. Is the key the TripleState
property? Does anyone have any ideas?
The worksheet can potentially contain results for hundreds of tests so I
REALLY don't want to start writing code. It's big enough as it is.
Ideas greatly appreciated! Sian



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default optionbutton - three options

This would work beautifully with the optionbutton from the forms toolbar -
any ideas how to make the group box smaller or the line around it invisible?!
(these little details...)

In testing out your idea, though, I realise that I should be linking my
activex optionbuttons to three different cells (so I get a FALSE/TRUE/FALSE
effect which updates in unison) - so actually you did solve my problem.
Thank you!


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default optionbutton - three options

You can hide the groupboxes in code--I don't think that there's any other way.

Hit alt-f11 to get to the VBE
hit ctrl-g to see the immediate window
type this and hit enter.

activesheet.groupboxes.visible = false

If you only want to hide a single groupbox, you can use something like:

activesheet.groupboxes("group box 1").visible = false



Sian wrote:

This would work beautifully with the optionbutton from the forms toolbar -
any ideas how to make the group box smaller or the line around it invisible?!
(these little details...)

In testing out your idea, though, I realise that I should be linking my
activex optionbuttons to three different cells (so I get a FALSE/TRUE/FALSE
effect which updates in unison) - so actually you did solve my problem.
Thank you!


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default optionbutton - three options

Why use a group box?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Sian" wrote in message
...
This would work beautifully with the optionbutton from the forms toolbar -
any ideas how to make the group box smaller or the line around it
invisible?!
(these little details...)

In testing out your idea, though, I realise that I should be linking my
activex optionbuttons to three different cells (so I get a
FALSE/TRUE/FALSE
effect which updates in unison) - so actually you did solve my problem.
Thank you!






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default optionbutton - three options

Well, don't I need a group box to keep my Forms optionbuttons in sets of
three, rather than all interacting with each other?
Or will different linked cells do this? Off to try it now...

"Bob Phillips" wrote:

Why use a group box?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Sian" wrote in message
...
This would work beautifully with the optionbutton from the forms toolbar -
any ideas how to make the group box smaller or the line around it
invisible?!
(these little details...)

In testing out your idea, though, I realise that I should be linking my
activex optionbuttons to three different cells (so I get a
FALSE/TRUE/FALSE
effect which updates in unison) - so actually you did solve my problem.
Thank you!





  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default optionbutton - three options

If you have multiple sets of optionbuttons, you'll want the groupboxes.

It wasn't clear (to me, at least) that you had multiple sets.

Sian wrote:

Well, don't I need a group box to keep my Forms optionbuttons in sets of
three, rather than all interacting with each other?
Or will different linked cells do this? Off to try it now...

"Bob Phillips" wrote:

Why use a group box?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Sian" wrote in message
...
This would work beautifully with the optionbutton from the forms toolbar -
any ideas how to make the group box smaller or the line around it
invisible?!
(these little details...)

In testing out your idea, though, I realise that I should be linking my
activex optionbuttons to three different cells (so I get a
FALSE/TRUE/FALSE
effect which updates in unison) - so actually you did solve my problem.
Thank you!






--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default optionbutton - three options

Nor me, it seemed like just the three.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Dave Peterson" wrote in message
...
If you have multiple sets of optionbuttons, you'll want the groupboxes.

It wasn't clear (to me, at least) that you had multiple sets.

Sian wrote:

Well, don't I need a group box to keep my Forms optionbuttons in sets of
three, rather than all interacting with each other?
Or will different linked cells do this? Off to try it now...

"Bob Phillips" wrote:

Why use a group box?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"Sian" wrote in message
...
This would work beautifully with the optionbutton from the forms
toolbar -
any ideas how to make the group box smaller or the line around it
invisible?!
(these little details...)

In testing out your idea, though, I realise that I should be linking
my
activex optionbuttons to three different cells (so I get a
FALSE/TRUE/FALSE
effect which updates in unison) - so actually you did solve my
problem.
Thank you!






--

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
Optionbutton troubles Mats Samson Excel Worksheet Functions 2 September 27th 07 04:54 PM
OptionButton. Reset to 0 Eef Houniet New Users to Excel 7 September 3rd 06 01:14 PM
how do I add more toolbar options to my right click options Rosie Excel Discussion (Misc queries) 1 August 11th 06 05:52 PM
OptionButton/CheckBox background picture Makafi Excel Discussion (Misc queries) 0 January 25th 06 03:03 PM
How Do I Tab From An OptionButton To A TextBox Minitman Excel Discussion (Misc queries) 0 February 23rd 05 10:34 PM


All times are GMT +1. The time now is 07:49 AM.

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

About Us

"It's about Microsoft Excel"