Redmondkw357
Technical User
I have a checkbox that I use the following code to change the properties but I would like it to apply to all checkboxes or any new checkboxes added to the document without having to copy it to each individual check box click event.
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
CheckBox1.Caption = "Complete"
CheckBox1.BackColor = 65535
CheckBox1.ForeColor = 25600
CheckBox1.SpecialEffect = fmButtonEffectSunken
Else
CheckBox1.Caption = "Status"
CheckBox1.BackColor = 16777215
CheckBox1.ForeColor = 255
CheckBox1.SpecialEffect = fmButtonEffectSunken
End If
End Sub
Can someone tell me how to make this apply to any checkbox and all new checkbox at one time?
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
CheckBox1.Caption = "Complete"
CheckBox1.BackColor = 65535
CheckBox1.ForeColor = 25600
CheckBox1.SpecialEffect = fmButtonEffectSunken
Else
CheckBox1.Caption = "Status"
CheckBox1.BackColor = 16777215
CheckBox1.ForeColor = 255
CheckBox1.SpecialEffect = fmButtonEffectSunken
End If
End Sub
Can someone tell me how to make this apply to any checkbox and all new checkbox at one time?