ColorStop object (Excel)

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

Remarks

The ColorStop object enables you to set properties for the cell fill, including the Color, ThemeColor, and TintAndShade properties.

Example

The following example shows how to apply properties to a ColorStop object.

With Selection.Interior 
 .Pattern = xlPatternLinearGradient 
 .Gradient.Degree = 135 
 .Gradient.ColorStops.Clear 
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

Methods

Properties

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.