CheckBox . . .

S

SJohn

I am new at Excel. I have on a worksheet 5 check boxes (A3 to A8)
I have them linked to B3 to A8. When a checkbox is activated in A3 then B3
shows "TRUE".
I am trying to make sure that only one of the 5 checkboxes can be activated
at any one time.
Any ideas?
 
F

FSt1

hi
if you want only one check box set to true then set the others to false at
the same time. i.e.
Private Sub CheckBox1_Click()
If CheckBox1 = True Then
CheckBox2 = False
CheckBox3 = False
CheckBox4 = False
CheckBox4 = False
End If
End Sub

each check box would need code similar to above but as each check box is
checked(set to true) the others are set to false(unchecked) so the second
check box code would look something like this....
Private Sub CheckBox2_Click()
If CheckBox2 = True Then
CheckBox1 = False
CheckBox3 = False
CheckBox4 = False
CheckBox4 = False
End If
End Sub
and so on for each check box.

Regards
FSt1
 

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

Top