Export (0) Print
Expand All

ColorStop Object

Office 2007
Represents the color stop point for a gradient fill in an range or selection.

Version Information
 Version Added:  Excel 2007


The ColorStop collection allows you to set properties for the cell fill including Color, ThemeColor, TintAndShade.

The following example shows how to apply properties to the ColorStop.

Visual Basic for Applications
With Selection.Interior
    .Pattern = xlPatternLinearGradient
    .Gradient.Degree = 135
End With

With Selection.Interior.Gradient.ColorStops.Add(0)
    .ThemeColor = xlThemeColorDark1
    .TintAndShade = 0
End With

With Selection.Interior.Gradient.ColorStops.Add(0.5)
    .ThemeColor = xlThemeColorAccent1
    .TintAndShade = 0
End With

With Selection.Interior.Gradient.ColorStops.Add(1)
    .ThemeColor = xlThemeColorDark1
    .TintAndShade = 0
End With

Community Additions

© 2014 Microsoft