View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
LesHurley LesHurley is offline
external usenet poster
 
Posts: 61
Default Preserve keyword

Thanks everyone. For my present purposes I was able to calculate the
ultimate dimensions of the array before the ReDim and therefor no need for
the Preserve keyword. I'm sending a ParamArray List() to the function and in
this case the size of List() and of each member of it are known when the
function is called. I guess if I ever need more than that I will just write
it in C++.
--
Thanks for your help


"Kenneth Hobson" wrote:

'You can use the worksheet function Transpose() to do it:

'pgc01, http://www.mrexcel.com/forum/showthread.php?p=1790513
Sub TestArray()
Dim v, v1

ReDim v(1 To 3, 1 To 4)

' some code

With Application
v1 = .Transpose(v)
ReDim Preserve v1(1 To 4, 1 To 5)
v = .Transpose(v1)
End With
End Sub