DataBar.BarFillType property (Excel)

Returns or sets how a data bar is filled with color. Read/write.

Syntax

expression.BarFillType

expression A variable that represents a DataBar object.

Return value

XlDataBarFillType

Remarks

The default value of the BarFillType property is xlDataBarFillGradient.

Example

The following code example selects a range of cells, adds a data bar conditional formatting rule to that range, and then sets the data bar's fill color to solid.

Range("A1:A10").Select 
Range("A1:A10").Activate 
 
Set myDataBar = Selection.FormatConditions.AddDatabar 
myDataBar.BarFillType = xlDataBarFillSolid

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.