while i'm on the subject of optimizing my code... i have tried to shorten this with a do loop (there are actually some with 50 checkboxes). when testing, i can f8 thru the thing, but it doesn't actually do anything on the form. i've since deleted my practice do loop code, but can recreate if needed. i just need to "check all" when the user checks the CheckBox_p2bprompt and "uncheck all" when the user unchecks it.
this is the original code i am trying to shorten:
thanks!!
this is the original code i am trying to shorten:
Code:
Private Sub CheckBox_p2bprompt_Click()
If CheckBox_p2bprompt.Value = True Then
CheckBox_p2bprompt1.Value = True
CheckBox_p2bprompt2.Value = True
CheckBox_p2bprompt3.Value = True
End If
If CheckBox_p2bprompt.Value = False Then
CheckBox_p2bprompt1.Value = False
CheckBox_p2bprompt2.Value = False
CheckBox_p2bprompt3.Value = False
End If
End Sub
thanks!!