Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
range to VBA array, and doing this fast
I need to transfer data from a large range to an array
dimmed as double. Assigning a range to an array dimmed as variant works, but I am transferring this array to a COM server and for that transfer I need it as an array dimmed double, not as variant. Is there a fast way of converting the variant array to a double array without looping through all the cells? Or is there another way of getting a range into a double array fast? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
range to VBA array, and doing this fast
You can make it still VERY fast by something like this:
Sub PossibleSolution() Dim x As Variant, y(44, 7) As Double x = Range("A1:G44") For i = 1 To 44 For j = 1 To 6 y(i, j) = x(i, j) Next Next End Sub "Erich Neuwirth" wrote: I need to transfer data from a large range to an array dimmed as double. Assigning a range to an array dimmed as variant works, but I am transferring this array to a COM server and for that transfer I need it as an array dimmed double, not as variant. Is there a fast way of converting the variant array to a double array without looping through all the cells? Or is there another way of getting a range into a double array fast? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to fix an array or range | Excel Discussion (Misc queries) | |||
Remove First Row from Variant Array FAST? | Excel Programming | |||
Array <--- Range | Excel Programming | |||
Range as array | Excel Programming | |||
Range as array | Excel Programming |