Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following code seems to work, but is it safe?
Sub RaggedArray Dim A() as Variant, B() as Long, i as Long, j as Long ReDim A(1 to 10) For i = 1 to 10 ReDim B(1 to I) A(i) = B For j = 1 to i A(i)(j) = 10 * i + j Next j Next i End Sub This seems to create an array A whose elements are arrays of varying lengths, which is what I want, but can I be sure the elements of A won't be overwritten by some other piece of code that needs to use memory? Does Visual Basic know the elements of A exist? Am I even asking a sensible question? -- Dave Empey Remember, if you're doing any major experiments in stellar dynamics, always mount a scratch star first! --Richard Todd |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do you create an Array of Arrays? | Excel Programming | |||
How do you create an Array of Arrays? | Excel Programming | |||
Arrays - declaration, adding values to arrays and calculation | Excel Programming | |||
Using arrays to create Combobox items | Excel Programming | |||
Create arrays in macro? | Excel Programming |