alexkeel79
MIS
I'm having some trouble with a redefining the size of a 2 dimensional array. I keep getting the following error:
Microsoft VBScript runtime error '800a0009'
Here is an example of my code:
dim contArr() 'dynamic array
reDim PRESERVE contArr(0,1) 'set initial size of the array
contArr(0,0) = "default_val"
contArr(0,1) = "default_val"
for a=1 to 10
arrLng = ubound(contArr,1) + 1 'upper bound of the first dimension + 1
reDim PRESERVE contArr(arrLng,1) 'THIS IS WHERE THE ERROR IS POINTING
contArr(arrLng,0) = "some_val"
contArr(arrLng,1) = "some_val"
next
Microsoft VBScript runtime error '800a0009'
Here is an example of my code:
dim contArr() 'dynamic array
reDim PRESERVE contArr(0,1) 'set initial size of the array
contArr(0,0) = "default_val"
contArr(0,1) = "default_val"
for a=1 to 10
arrLng = ubound(contArr,1) + 1 'upper bound of the first dimension + 1
reDim PRESERVE contArr(arrLng,1) 'THIS IS WHERE THE ERROR IS POINTING
contArr(arrLng,0) = "some_val"
contArr(arrLng,1) = "some_val"
next