I need some help and I can't find the answer elsewhere on here or anywhere.
I'm using jagged arrays to store information, I declared it as so:
Dim mainArray() As Variant, subArray() As Variant
...
Redim mainArray(1 To 5)
Redim subArray(1 To 5)
mainArray(1) = subArray
...
and later when I need the subArray to be bigger I can only think to use:
Redim Preserve mainArray(1)(6)
but I get a "Syntax Error" from Excel. How do I ReDim the subArray of mainArray(1) without losing any of the data?
Can anyone help?
I'm using jagged arrays to store information, I declared it as so:
Dim mainArray() As Variant, subArray() As Variant
...
Redim mainArray(1 To 5)
Redim subArray(1 To 5)
mainArray(1) = subArray
...
and later when I need the subArray to be bigger I can only think to use:
Redim Preserve mainArray(1)(6)
but I get a "Syntax Error" from Excel. How do I ReDim the subArray of mainArray(1) without losing any of the data?
Can anyone help?