Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 08-03-2017, 03:35 PM
macropod's Avatar
macropod macropod is offline Change colours in different tables based on dropdown selections Windows 7 64bit Change colours in different tables based on dropdown selections Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:
Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
With ContentControl
  Select Case .Title
    Case "Rating"
      Select Case .Range.Text
        Case "Unsatisfactory": .Range.Cells(1).Shading.BackgroundPatternColor = 4739264
        Case "Satisfactory With Improvements Needed": .Range.Cells(1).Shading.BackgroundPatternColor = 5232127
        Case "Satisfactory": .Range.Cells(1).Shading.BackgroundPatternColor = 5880731
        Case Else: .Range.Cells(1).Shading.BackgroundPatternColorIndex = wdNoHighlight
      End Select
    Case "Risk"
      Select Case .Range.Text
        Case "High": .Range.Cells(1).Shading.BackgroundPatternColor = 4739264
        Case "Moderate": .Range.Cells(1).Shading.BackgroundPatternColor = 5232127
        Case "Low": .Range.Cells(1).Shading.BackgroundPatternColor = 5880731
        Case Else: .Range.Cells(1).Shading.BackgroundPatternColorIndex = wdNoHighlight
      End Select
    Case Else
  End Select
End With
End Sub
PS: Splitting your posts to a separate thread.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change colours in different tables based on dropdown selections Help with Hide/Display of sections of document based on Drop Down selections turnquistcm Word 2 05-03-2017 07:05 PM
Change colours in different tables based on dropdown selections Best way to load data into a template based on user selections Timbo Word 1 11-07-2013 05:14 AM
Change colours in different tables based on dropdown selections Contact details entered based on multiple drop down selections ntropey87 Word VBA 4 04-20-2013 11:19 AM
add values to dropdown selections and calculate guyhs Word 7 10-24-2012 05:11 PM
Template: group dropdown selections mfoe33 Word 0 10-15-2012 02:58 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:23 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft