Ich würde gerne diesen code (gefunden im inet) für mehrer drop down felder nutzen. Ich habe nebst dem drop down "Status" 7 weitere drop down felder, jeweils mit anderen color coding.
Frage: Wie kann ich im unten stehenden code weitere if statements einfügen für weitere drop downs. Vielen Dank.
- Code: Alles auswählen
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
With ContentControl.Range
If ContentControl.Title = "Status" Then
Select Case .Text
Case "Complete"
.Cells(1).Shading.BackgroundPatternColor = wdColorRed
Case "In Progress"
.Cells(1).Shading.BackgroundPatternColor = wdColorGreen
Case "Not Start"
.Cells(1).Shading.BackgroundPatternColor = wdColorBlue
Case Else
.Cells(1).Shading.BackgroundPatternColor = wdColorAutomatic
End Select
End If
End With
End Sub