Search notes:

Excel Object Model: Border

A Border object represents one of the four edges of a Range.
There are even «borders» that are not strictly at a ranges edge/border. The possible border locations are enumerated with the xlBordersIndex enum which has the following values:
xlDiagonalDown 5
xlDiagonalUp 6
xlEdgeBottom 9
xlEdgeLeft 7
xlEdgeRight 10
xlEdgeTop 8
xlInsideHorizontal 12
xlInsideVertical 11

Properties

application
color
colorIndex
creator
lineStyle
parent
themeColor
tintAndShade
weight

LineStyle

dim r as long
public sub main() ' {

    r = 2

    drawBorders "xlContinuous"   , xlContinuous
    drawBorders "xlDash"         , xlDash
    drawBorders "xlDashDot"      , xlDashDot
    drawBorders "xlDashDotDot"   , xlDashDotDot
    drawBorders "xlDot"          , xlDot
    drawBorders "xlDouble"       , xlDouble
    drawBorders "xlLineStyleNone", xlLineStyleNone
    drawBorders "xlSlantDashDot" , xlSlantDashDot

    columns(1).columnWidth = 3
    columns(2).autofit

    activeWorkbook.saved = true

end sub ' }

private sub drawBorders(name as string, style as xlLineStyle) ' {

    dim cell as range
    dim bord as border

    set cell = cells(r, 2)
    cell.borders.lineStyle = style

    cell.value = name
    r = r+2

end sub ' }

Weight

A border's thickness is controlled by the value of its weight property.
This property can be set to one of the following xlBorderWeight enumeration values:
xlHairline 1
xlMedium -4138
xlThick 4
xlThin 2

See also

The border tab in the ­Format Cells popup.
A range's borderAround method draws a border around its area.
The color of a border might be set with its colorIndex property.
Excel Object Model

Index