sdfdf sdafa
sdfdf sdafa

Reputation: 3

In VBscript, how do you set an array element to be a dynamic array?

I want each element of an array to be a dynamic array that I can later individually resize with ReDim. I don't want to use ArrayList or use a 2d array. Is this possible, and how?

Upvotes: 0

Views: 174

Answers (1)

j__m
j__m

Reputation: 9625

Redim MasterArray(10)
For x = 1 To 10
    Redim SubArray(10)
    MasterArray(x) = SubArray
Next 


MasterArray(1)(2) = 5
MasterArray(2)(2) = 6
MsgBox MasterArray(1)(2) ' shows 5
MsgBox MasterArray(2)(2) ' shows 6

Upvotes: 2

Related Questions