View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Loop for check boxes

Are the checkboxes numbered 1 thru 80 on a sheet or are the on individual
form and numbered 1 thru 4 on each form? If they are on the forms, you could
just copy the code 19 times to the checkbox1 on the other forms.

As far as looping to write the code for the 1 thru 80, it could get pretty
hairy.

"Karissa" wrote:

Below is the code I have. i haven't written code in a long time and can't
remember how to write a loop for this - i have about 20 sets of four check
boxes and don't want to do this for every one of them - Thanks to any one who
can help

------
Private Sub CheckBox1_Click()
If CheckBox1 = True Then
CheckBox2 = False
CheckBox3 = False
CheckBox4 = False
End If
End Sub




Private Sub CheckBox2_Click()
If CheckBox2 = True Then
CheckBox1 = False
CheckBox3 = False
CheckBox4 = False
End If
End Sub

Private Sub CheckBox3_Click()
If CheckBox3 = True Then
CheckBox1 = False
CheckBox2 = False
CheckBox4 = False
End If
End Sub

Private Sub CheckBox4_Click()
If CheckBox4 = True Then
CheckBox1 = False
CheckBox2 = False
CheckBox3 = False
End If
End Sub
--
Karissa