formula for selecting all cells
one way:
Dim vSides As Variant
Dim i As Long
vSides = Array(xlEdgeTop, xlEdgeBottom, xlEdgeLeft, xlEdgeRight)
With ActiveSheet.UsedRange.Borders
For i = 0 To UBound(vSides)
With .Item(vSides(i))
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Next i
End With
In article ,
"Andre" wrote:
I'm trying to create a macro that will select all my cells from the beginning
(top left) to the last one (bottom right corner) and then put a border around
them. Any help is appreciated.
|