View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Adresmith[_6_] Adresmith[_6_] is offline
external usenet poster
 
Posts: 1
Default Please Help!checkbox relative reference

I have about 400 checkboxes on multi tabs of a multi tab control.
They are named/set up as follows:

CheckBoxA CheckBoxB CheckBoxC
CheckBoxD CheckBoxE CheckBoxF.....

I set up code to ensure that if CheckBoxA is Checked, CheckBoxB and
will be unchecked etc. (see below)

My problem is, I don't want to write code for each CheckBox's OnClic
Event. I want to know if there is a way to reference the CheckBoxe
around the current checkbox using some type of relative reference.

My current code is:

Private Sub CheckBoxA_Click()
If CheckBoxA = True Then
CheckBoxB.Value = Not CheckBoxA.Value
CheckBoxC.Value = Not CheckBoxA.Value
End If
End Sub

If anyone can help me modify this to make my life easier, I would b
sooooo appreciative.

Thanks

--
Message posted from http://www.ExcelForum.com