Load selection into an Array - VBA
In the worst case, if your selection is a pile on non-contiguous cells, then:
Sub sel_to_array()
Dim ar() As Variant
ReDim ar(1 To Selection.Count) As Variant
i = 1
For Each r In Selection
ar(i) = r.Value
i = i + 1
Next
End Sub
--
Gary''s Student - gsnu2007j
"brittonsm" wrote:
How do I take a selection of cells on the sheet and load them into an
Array in VBA?
-Steve
|