Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Word VBA CheckBoxes

Status
Not open for further replies.

Redmondkw357

Technical User
Feb 11, 2019
7
0
0
US
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top