EXCEL: Round Dot LineStyle for Cell Border

2.5k Views Asked by At

Using VBA in excel for a Cell Border (not a chart):

Cannot set the Borders.Linestyle property to have the round dot linestyle (see attached photo). Using .Linestyle = xlDot results in the larger, square dashes rather than the smaller round dots.

I've also tried setting weight to xlThin but this does not seem to make a difference.

enter image description here

2

There are 2 best solutions below

2
On BEST ANSWER

Try

.LineStyle = xlContinuous
.Weight = xlHairline
0
On

With xlHairline you can attempt to use .Weight = xlHairline with .LineStyle = xlContinuous to get the thinnest line possible, which may look like a dotted line under certain conditions.

Sample code snippet:

With targetRange.Borders(xlEdgeBottom)
    .LineStyle = xlContinuous
    .Weight = xlHairline
    .Color = RGB(0, 0, 0)  ' Black
End With