You can only redimension the last dimension of an array.
<quote source="google search">
When using multi dimensional arrays, it is only possible to redim the last
dimension.
Say you array looks like this:
Dim myArr()
Redim myArr(5,5)
You will be able to do
Redim myArr(5,10)
But you won't be able to do
Redim myArr(10,5)
This behaviour is by design, so you can't get around it...
</quote>
Hope this helps (or not of course).
Chris.
"Wayne Wengert" <> wrote in message
news:...
I am trying to add one column to an existing array (code below). The ReDim
command gives the error:
-----------------------------------------------
Microsoft VBScript runtime error '800a0009'
Subscript out of range
/ListCGShowsGrouped.asp, line 58
------------------------------------------------
The Response.Write shows that the array has 9 rows and 3 cols (it displays 8
and 2) before the redim and I want a 9 x 4 after the redim.
What am I doing wrong here?
============ Code ===============
........
aryShows = myRS.GetRows
intRows = Ubound(aryShows,2)
intCols = Ubound(aryShows,1)
MyRS.Close
Response.Write("Rows: " & introws & " - Cols: " & intcols & "<br>")
Redim Preserve aryShows(intCols + 1, introws)
--
------------------------------------
Wayne Wengert