
VBA Borders in Excel — Draw Cell Borders in Code (and Why the Whole Block Got Boxed)
A border in Excel VBA is a property of an edge, not a switch on the cell. A range has eight addressable borders — four outer edges, two sets of interior gridlines, and two diagonals — and the bare Range.Borders collection means all of them at once. That is why Range.Borders.LineStyle = xlContinuous boxes every single cell instead of drawing one outline. Learn when to use BorderAround for just the frame, how LineStyle, Weight and Color combine, how to set one edge with xlEdgeBottom, and how to clear borders with xlLineStyleNone.



































































