vba cell all borders
' set "All Boarders" around a range
ActiveSheet.Range("A1:C3").Borders.LineStyle = xlContinuous
vba cell all borders
' set "All Boarders" around a range
ActiveSheet.Range("A1:C3").Borders.LineStyle = xlContinuous
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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us