Borders Collection Object

Multiple objects
Borders
LineFormat
ColorFormat

A collection of LineFormat objects that represent the borders and diagonal lines of a cell or range of cells in a table.

Using the Borders Collection

Each Cell object or CellRange collection has six elements in the Borders collection. You cannot add objects to the Borders collection.

PPBorderType

PPBorderType can be one of these PPBorderType constants.
ppBorderBottom
ppBorderLeft
ppBorderRight
ppBorderTop
ppBorderDiagonalDown
ppBorderDiagonalUp

Use the DashStyle property to apply a dashed line style to a Border object. This example selects the second row from the table and applies a dashed line style to the bottom border.

ActiveWindow.Selection.ShapeRange.Table.Rows(2) _
    .Cells.Borders(ppBorderBottom).DashStyle = msoLineDash

Properties | Application Property | Count Property | Parent Property

Methods | Item Method

Parent Objects | Cell | CellRange

Child Objects | ColorFormat

See Also | Borders Property