Using Drop Downs and Check Boxes

  • Thread starter Thread starter Joe M
  • Start date Start date
J

Joe M

I'm not really a new user but I can't really find a more
appropriate forum thread to post in. What I want to do is
either use a drop down list where the drop down items are
actually different text colors or use a check box that
when selected turns another color. It seems like a simple
thing but perhaps I would have to use macros which I am
not familiar with creating. Thanks for any help anyone
can provide. Using Office 2k by the way.
 
Joe,

The following macro set to run on exit from the first
formfield checkbox in the document will change color to
red when checked.

Sub ChangeCheckBoxColor()

Dim Box

Box = ActiveDocument.FormFields(1).CheckBox.Value

If Box = True Then
With ActiveDocument
.FormFields(1).Select
.Sections(1).ProtectedForForms = False
Selection.Font.Color = wdColorRed
.Sections(1).ProtectedForForms = True
End With

Else 'Have to have the Else statement to turn field
back to black.
With ActiveDocument
.FormFields(1).Select
.Sections(1).ProtectedForForms = False
Selection.Font.Color = wdColorBlack
.Sections(1).ProtectedForForms = True
End With
End If
End Sub
 
Back
Top