Answers for "excel vba set range borders like grid"

VBA
1

excel vba set range borders like grid

'VBA routine to set the grid borders THROUGHOUT a range:

Sub SetRangeGrid(r As Range, Optional stl = 1, Optional clr = 0, Optional wgt = 2)
    With r.Borders()
        .LineStyle = stl
        .Color = clr
        .Weight = wgt
    End With
End Sub

'--------------------------------------------------------------------

SetRangeBorder [d2:k10]
SetRangeBorder [d2:k10], vbRed
SetRangeBorder [d2:k10], , xlThick
Posted by: Guest on March-30-2020

Code answers related to "VBA"

Browse Popular Code Answers by Language