Linking check boxes so if one is true the other shows false

G

Guest

I have two "yes or no" check boxes but they are both linked to the same cell
so both read the same (checked or unchecked). Is there a way to reverse one
so that it indicates "checked" when the source cell is false so they will
work together? I tried going to design mode and selecting "group" but the
options were gray-scale so not available (don't know why). I tried using
option buttons but was limited on the number. Thanks in advance.
 
D

Dave Peterson

So you only want one of the checkboxes selected at any time?

If yes, then it sounds like you should be using OptionButtons instead of
checkboxes. That's the way OptionButtons behave.
 
G

Guest

Thanks, for the great advice, Dave. I switched to Option Buttons and achieved
my goal but there is still one problem...I have several rows of Yes/No
answers and it looks very cluttered because I had to place a group box around
each set to make them independant. Is there a way to make the border of the
group box the same color as my worksheet background so as to be invisible?
Thanks again.
 
D

Dave Peterson

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 it blows up (it might if you have lots of these groupboxes), you can run a
macro:

option explicit
sub testme()
dim myGB as groupbox
for each myGB in activesheet.groupboxes
mygb.visible = false
next mygb
end sub

Remember how you did this, so you can fix things if you need to.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

If you ever need to do this in code, you may want to look at Debra Dalgleish's
site:
http://contextures.com/xlForm01.html
 
G

Guest

Thanks again, Dave. Worked perfectly!

Dave Peterson said:
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 it blows up (it might if you have lots of these groupboxes), you can run a
macro:

option explicit
sub testme()
dim myGB as groupbox
for each myGB in activesheet.groupboxes
mygb.visible = false
next mygb
end sub

Remember how you did this, so you can fix things if you need to.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

If you ever need to do this in code, you may want to look at Debra Dalgleish's
site:
http://contextures.com/xlForm01.html
 

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

Similar Threads


Top