DataBarBorder.Type property (Excel)
Returns or sets the type of border for data bars specified by a conditional formatting rule. Read/write.
Syntax
expression.Type
expression A variable that represents a DataBarBorder object.
Return value
Example
The following code example selects a range of cells, adds a data bar conditional formatting rule to that range, uses the BarBorder property to retrieve the DataBarBorder object associated with that rule, and then sets the data bar color, tint, and type.
Range("A1:A10").Select
Range("A1:A10").Activate
Set myDataBar = Selection.FormatConditions.AddDatabar
With myDataBar.BarBorder
.Type = xlDataBarBorderSolid
.Color.ThemeColor = xlThemeColorAccent2
.Color.TintAndShade = 0
End With
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.