optionbutton - three options

  • Thread starter Thread starter Sian
  • Start date Start date
S

Sian

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
 
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)
 
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!
 
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
 
Why use a group box?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
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...
 
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.
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top