What is the syntax to format borders?

Range(“<cell reference>”).Borders.LineStyle= <line style>
Range(“<cell reference>”).Borders.Weight = <thickness style>
Range(“<cell reference>”).Borders.Color= <rgb color>
  • Line style options: xlContinuous, xlDot, xlDashDotDot, xlDash, xlSlantDashDot, xlDouble
  • Thickness options: xlThin, xlMedium, xlThick
‘examples
Range(“B4”).Borders.LineStyle= xlDash
Range(“B4”).Borders.Color= rgbBlueViolet

 

 

Advertisements