|
-
Mar 16th, 2005, 11:33 AM
#1
Thread Starter
Member
Setting Array = Excel Range Values?
Is there a way to set the indices of an array equal to the values of cells in a range? Like this:
Dim myArray(1 to 2, 1 to 5) As Long
myArray = Range(Cells(1,1), Cells(2,5)).Value
I can't get the above code to work. I can easily go the other way:
Range(Cells(1,1), Cells(2,5)).Value = myArray
Is there a trick to it, other than simply looping through each cell and storing the value in the corresponding array index? Any help would be appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|