View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Carl Carl is offline
external usenet poster
 
Posts: 361
Default Linking check boxes so if one is true the other shows false

Thanks again, Dave. Worked perfectly!

"Dave Peterson" wrote:

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



Carl wrote:

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.

"Dave Peterson" wrote:

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.

Carl wrote:

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.

--

Dave Peterson


--

Dave Peterson