View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
TheVisionThing TheVisionThing is offline
external usenet poster
 
Posts: 22
Default Out of Memory: Array Transpose

Tom,

Excellent point, but in this instance I'm adding records to an already large
2d array by using Redim Preserve. Since Redim Preserve will only increase
the second dimension of a 2d array, not the first dimension, I'm transposing
the array first and then transposing it back after adding the records. Now,
granted, instead of doing that, I can create a new temporary bigger array,
write the old records and the new records to it, and then delete the old
array instead, but I suspect I may encounter the same out of error message
I'm getting currently on the line:

ReDim arrOut(intLowerj To lngUpperJ, intLoweri To lngUpperI)

in my transpose function. In both instances I'm duplicating a large array
in memory.

I may experiment with this, though, unless someone has a better suggestion.

Thanks,
Wayne C.