DailyDrama
New Member
- Joined
- Nov 26, 2019
- Messages
- 2
- Office Version
- 2013
- Platform
- Windows
Hi, i have a drop down list that i want to change the font color of based on the selection. Two out of three of my selections/Font color change work - but i cannot get "Amber" to work. I have "white" as the font colour - it works, but when i change the color to Amber or Orange - it doesnt work. What am i doing wrong??
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
With ContentControl.Range
If ContentControl.Title = "Status" Then
Select Case .Text
Case "GREEN - controls green or <=2 controls amber"
.Font.ColorIndex = wdGreen
.Cells(1).Shading.BackgroundPatternColor = wdColorGreen
Case "AMBER - >2 controls amber - up to 6, No more than 1 control red"
.Font.ColorIndex = wdWhite
.Cells(1).Shading.BackgroundPatternColor = wdColorOrange
Case "RED - >1 control Red"
.Font.ColorIndex = wdRed
.Cells(1).Shading.BackgroundPatternColor = wdColorRed
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
With ContentControl.Range
If ContentControl.Title = "Status" Then
Select Case .Text
Case "GREEN - controls green or <=2 controls amber"
.Font.ColorIndex = wdGreen
.Cells(1).Shading.BackgroundPatternColor = wdColorGreen
Case "AMBER - >2 controls amber - up to 6, No more than 1 control red"
.Font.ColorIndex = wdWhite
.Cells(1).Shading.BackgroundPatternColor = wdColorOrange
Case "RED - >1 control Red"
.Font.ColorIndex = wdRed
.Cells(1).Shading.BackgroundPatternColor = wdColorRed