G Guest Sep 20, 2007 #1 Hi. How to set a solid border for range, not for each cell. For example Range("A1:A3") Greetings and thanks for help
Hi. How to set a solid border for range, not for each cell. For example Range("A1:A3") Greetings and thanks for help
B Bernie Deitrick Sep 20, 2007 #2 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
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