![]() |
|
|
|
#1
|
||||
|
||||
|
Hi Greg,
Something like that should only be needed if there are vertically-merged cells, in which case, I'd suggest: Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Application.ScreenUpdating = False
Dim r As Long, TblCell As Cell, Clr As Long
With ContentControl
If Left(.Title, 6) = "Status" Then
Select Case .Range.Text
Case "COMPLETE": Clr = wdGreen
Case "Pending": Clr = wdYellow
Case Else: Clr = wdNoHighlight
End Select
r = .Range.Cells(1).RowIndex
With .Range.Tables(1).Range
For Each TblCell In .Cells
With TblCell
If .RowIndex = r Then .Shading.BackgroundPatternColorIndex = Clr
End With
Next
End With
End If
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
| Tags |
| color, dropdown, reaction |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| block selection in dropdown list | Intruder | Excel | 2 | 01-10-2013 10:20 AM |
Dropdown selection value
|
coconutt | Word VBA | 5 | 09-13-2012 05:23 PM |
Change cell color when selection is made from a drop down list
|
fedcco | Excel | 12 | 08-28-2012 10:43 PM |
Autofill a form which is contingent on a dropdown selection.
|
biffle0764 | Word | 2 | 05-09-2012 12:54 PM |
| Change cell color everytime a value is selected in dropdown list | angelica_gloria | Excel | 4 | 01-27-2012 06:47 PM |