View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
bob bob is offline
external usenet poster
 
Posts: 12
Default Code for Many check boxes

Below is code I am now using per row, per
check box. How can it be written to do the same thing 10 to 20 times
without writing the same code per row for each check box 10 to 20 times?
Using a starting check box number and ending with a higher check box
number.

Private Sub CheckBox2_Click()
With CheckBox2
If .Value = True Then
Worksheets(2).Range("A9:C9").Value =
ActiveSheet.Range("A9:C9").Value
Else
Worksheets(2).Range("A9:C9").Value = ""
End If
End With
End Sub

Thanks for your help