![]() |
|
|
|
#1
|
|||
|
|||
|
What type of dropdown are you using? Word doesn't have a built-in "change" event for content control dropdowns, but you could use the OnEntry and OnExit events:
Code:
Dim oCell As Cell
Private Sub Document_ContentControlOnEnter(ByVal ContentControl As ContentControl)
Select Case ContentControl.Title
Case "Demo"
Set oCell = Selection.Cells(1)
End Select
End Sub
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Select Case ContentControl.Title
Case "Demo"
Select Case ContentControl.Range.Text
Case "A": oCell.Shading.BackgroundPatternColorIndex = wdBrightGreen
Case "B": oCell.Shading.BackgroundPatternColorIndex = wdDarkRed
End Select
End Select
End Sub
|
|
#2
|
|||
|
|||
|
I'm using a Drop-down Form Field with the 4 options being; Positive, Neutral, Poor or None.
Do I need to create a macro that calculates on exit? Can you explain exactly what I would need to do as I'm not too hot on creating macros. Thank you for your response T |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Conditionally Color Formatting Text selected from a dropdown list in Word 2010
|
pgammag | Word | 9 | 08-20-2019 04:17 PM |
Conditional formatting that ignores other formatting rules
|
info_guy2 | Excel | 1 | 07-03-2014 10:07 AM |
Loosing Formatting on Data in dropdown box
|
arshaw | Word | 5 | 02-26-2013 12:37 PM |
Conditional formatting with AND, OR
|
Lucky | Excel | 2 | 10-03-2011 11:41 PM |
| Conditional Formatting | namedujour | Excel | 3 | 08-25-2011 01:46 PM |