I am using Office 2002 to create a vacation request form that uses the
dropdown menu. I would like to make the dropdown menu selection highlighted
if certain options are selected - so that those stand out from the rest of
the form. (For example if a letter is selected instead of a number I want
the letter answer to be hightlighted in Yellow) Is there a script or macro
that I can create and use on exit that will highlight if they select P
instead of 1 for example.
Greg - 09 Feb 2005 20:02 GMT
toptan,
Something like:
Sub HighLightFF()
Dim Drop As FormField
Set Drop = ActiveDocument.FormFields("DropDown1")
If Not (IsNumeric(Drop.Result)) Then
With ActiveDocument
.Sections(1).ProtectedForForms = False
Drop.Range.HighlightColorIndex = wdYellow
.Sections(1).ProtectedForForms = True
End With
Else: With ActiveDocument
.Sections(1).ProtectedForForms = False
Drop.Range.HighlightColorIndex = wdNoHighlight
.Sections(1).ProtectedForForms = True
End With
End If
End Sub