object representing a color from the specified color scheme.
expression.Colors(ColorIndex)
expression Required. An expression that returns one of the objects in the Applies To list.
ColorIndex Required PbSchemeColorIndex. The color from the scheme to return based on its function in the scheme.
PbSchemeColorIndex can be one of these PbSchemeColorIndex constants. |
pbSchemeColorAccent1 |
pbSchemeColorAccent2 |
pbSchemeColorAccent3 |
pbSchemeColorAccent4 |
pbSchemeColorAccent5 |
pbSchemeColorFollowedHyperlink |
pbSchemeColorHyperlink |
pbSchemeColorMain |
pbSchemeColorNone |
Example
The following example loops through the ColorSchemes collection and looks for color schemes where the followed hyperlink color matches the color with the RGB value of 128.
Dim cscLoop As ColorScheme
Dim colTemp As ColorFormat
For Each cscLoop In Application.ColorSchemes
With cscLoop
Set colTemp = .Colors(ColorIndex:=pbSchemeColorFollowedHyperlink)
If colTemp.RGB = RGB(128, 0, 0) Then
Debug.Print "Color scheme '" & .Name _
& "' has a followed hyperlink " _
& "color matching RGB(128, 0, 0)"
End If
End With
Next cscLoop