View Single Post
 
Old 08-02-2022, 05:02 AM
bwhitlock bwhitlock is offline Windows 11 Office 2021
Novice
 
Join Date: Aug 2022
Posts: 1
bwhitlock is on a distinguished road
Default VBA to change multiple change drop down font color and make bold

Hi,

I have the following code that sucessfully changes the text color of a drop down box in Microsoft Word depending on the selection. How do i also change the background color


Code:
If .Title = "Condition" Then
    Select Case .Range.Text
      Case "High": .Range.Font.Color = RGB(192, 0, 0)
      Case "Medium": .Range.Font.Color = RGB(192, 0, 0)
      Case "Low": .Range.Font.Color = RGB(64, 64, 64)
      Case Else: .Range.Shading.BackgroundPatternColorIndex = wdNoHighlight
    End Select
  End If
Reply With Quote