Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to fix an array or range delboy Excel Discussion (Misc queries) 1 February 12th 08 08:14 PM
Remove First Row from Variant Array FAST? R Avery Excel Programming 18 August 20th 04 03:29 PM
Array <--- Range Charley Kyd[_2_] Excel Programming 7 January 14th 04 08:00 AM
Range as array J.E. McGimpsey Excel Programming 1 September 10th 03 11:06 PM
Range as array Chip Pearson Excel Programming 0 September 10th 03 10:40 PM


All times are GMT +1. The time now is 02:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"