View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Wanting to write results to array instead of sheet, results overwriting....

If "b" is a 2D array and IntermediateArray is dim'd as Variant, then
IntermediateArray should be identical to the "b" array.

--
Regards,
Tom Ogilvy

wrote in message
oups.com...
Hi y'all

I have a problem, i have the following sub:

Sub PrintIt()

Range(Cells(9, 2 + Col), Cells(8 + UBound(b, 1), 2 + Col)).Value =
b
Col = Col + 1

End Sub


However I want vba to write the results not in the defined range but in
an array. However if I change the above sub in the following:

Sub PrintIt()

IntermediateArray = b
Col = Col + 1

End Sub

I get that the code overwrites itself and i only get one line of
results. does anybody know how I can rewrite the code so it gets the
same results only inside an array instead of written on a sheet?

thanks a lot!

rgds, Sarju