Array of Public Arrays

  • Thread starter Thread starter Hari Prasadh
  • Start date Start date
H

Hari Prasadh

Hi,

How to define Array of Arrays where all the arrays are Public.

Problem is size of public array and the size of array of public arrays is
calculated programmatically (both are dynamic arrays).

I have used the Redim statement but not able to implement in this case.
 
You don't declare an array of arrays

You declare an array of type variant, then assign arrays to its elements.

Public v() as Variant

sub Set array()

redim v(1 to 3)

v(1) = Array(1,2,3,4,5,6,7)
v(2) = Array("a","b","c")
v(3) = Array("Tom","Dick","Harry")

msgbox v(2)(3)

End Sub
 
Back
Top