Returns a Border object that represents one of the borders of either a range of cells or a style.
Syntax
expression.Item (Index)
expression A variable that represents a Borders object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Index | Required | XlBordersIndex | Can be one of the XlBordersIndex constants. |
Example
This following example sets the color of the bottom border of cells A1:G1.
Worksheets("Sheet1").Range("A1:G1").Borders.item(xlEdgeBottom).Color = RGB(255, 0, 0)