Partager via


Databar.BarFillType Property (Excel)

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

Version Information

Version Added: Excel 2010

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

See Also

Concepts

Databar Object

Databar Object Members