Do I need these lines?
Hi Greg,
No you do not need the superfluous lines. As a little added information you
can set a range to a union of multiple ranges like the following and add the
borders to each of the ranges in the union.
Note that a space and underscore at the end of a line is a line break in an
otherwise single line of code.
Dim currentRange As Range
Set currentRange = Union(Range("B2:D5"), _
Range("B11:D15"), _
Range("B21:D25"))
With currentRange
.Borders(xlEdgeLeft).Weight = xlMedium
.Borders(xlEdgeTop).Weight = xlMedium
.Borders(xlEdgeBottom).Weight = xlMedium
.Borders(xlEdgeRight).Weight = xlMedium
End With
--
Regards,
OssieMac
|