View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Border for range

Dim myR As Range

Set myR = Range("A1:A3")

myR.Borders(xlEdgeLeft).LineStyle = xlContinuous
myR.Borders(xlEdgeTop).LineStyle = xlContinuous
myR.Borders(xlEdgeBottom).LineStyle = xlContinuous
myR.Borders(xlEdgeRight).LineStyle = xlContinuous
myR.Borders(xlInsideHorizontal).LineStyle = xlNone


You can also set the line weight and color:
myR.Borders(xlEdgeLeft).Weight = xlThin
myR.Borders(xlEdgeLeft)..ColorIndex = xlAutomatic

etc.

HTH,
Bernie
MS Excel MVP


"bobens_83" wrote in message
...
Hi. How to set a solid border for range, not for each cell. For example

Range("A1:A3")

Greetings and thanks for help