change color of cell based upon form drop down selection
Tim.
Yes.
You create and assign a macro to run on exit from the formfield.
Let's say you have a dropdown with the values "Red" "Blue" and "Green."
The formfield has a bookmark name of "ColorPicker"
Sub OnExitDD()
ActiveDocument.Unprotect
Select Case ActiveDocument.FormFields("ColorPicker").Result
Case "Red"
ActiveDocument.Tables(1).Cell(?, ?).Range.Font.Color = wdColorRed
ActiveDocument.Tables(1).Cell(?,
?).Range.Shading.BackgroundPatternColor = wdColorDarkRed
Case "Blue"
'Like above except differenct colors
Case "Whatever"
'Like above
Case Else
'Do Nothing
End Select
ActiveDocument.Protect wdAllowOnlyFormFields, True
End Sub
Tim Doyle wrote:
Is it possible to change the background color (or font) of a cell
conditionally based upon a selection made from a drop down box within another
cell of the same table?
|