Hi,
I am trying to Redim a child array nested within a parent array. The child array remains nameless. Here is the meat of the code that generates the following error:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
arr2d is an existing 2d array to be converted into a nested array of arrays (this is to trim up a listing of repeated entries, but to also catalog the repetition). The code below is executed for every 1st dim entry in arr2d. arr2d is not referenced below.
I've trimmed up the code to focus on the one line to keep it concise.
This seems to be a legal way of referencing and redimming the nested array, but it doesn't work. Any help would be great. Thanks.
I am trying to Redim a child array nested within a parent array. The child array remains nameless. Here is the meat of the code that generates the following error:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
arr2d is an existing 2d array to be converted into a nested array of arrays (this is to trim up a listing of repeated entries, but to also catalog the repetition). The code below is executed for every 1st dim entry in arr2d. arr2d is not referenced below.
I've trimmed up the code to focus on the one line to keep it concise.
Code:
For i = 0 to UBound(arrParent) - 1
'Check to see if repetition exists. If so, execute the
'line below
ReDim Preserve arrParent(i)(UBound(arrParent(i))+1)
'add values into newly expanded child array here.
Next
This seems to be a legal way of referencing and redimming the nested array, but it doesn't work. Any help would be great. Thanks.