Quick way of copying Range to (sub)Array ?
dim a1(1 to 2, 1 to 3)
a1=range("a1:c3")
loads values from the selected range into the 2D array. Is there an
elegant way of doing the same sort of thing with a 2D subset of a 3D array?
dim a2(1 to 2, 1 to 3, 1 to 2)
a2(,,2)=range("a1:c3")
The left hand side of the last statement is syntactically incorrect but
hopefully serves to demonstrate what I am trying to achieve. I'd like to
avoid having to use a loop to load values into the array one element at
a time.
Regards, John M
|