Answers for "border vba excel"

VBA
0

excel vba borders

Dim wksWorksheet As Worksheet, rRange As Range
Set wksWorksheet = ThisWorkbook.Worksheets(1)
Set rRange = wksWorksheet.Range("A1:D10")
' All borders
With rRange.Borders
    .LineStyle = xlContinuous
    .Color = vbRed
    .Weight = xlThin
End With
' Outside borders
rRange.BorderAround xlContinuous, xlMedium, xlColorIndexAutomatic
' Inside
With rRange.Borders.Item(xlInsideHorizontal)
    .ColorIndex = 5
    .LineStyle = xlContinuous
    .Weight = xlThin
End With
Posted by: Guest on January-14-2021

Code answers related to "VBA"

Browse Popular Code Answers by Language