Create dynamic array multi-dimension

G

GeckoNewsgroup

Hi,

When a try this script:

NbrAuteur = 19

Dim arrTestArray()
intSize = 0

1: For x = 0 to (nbrAuteur - 1)
2: ReDim Preserve arrTestArray(intSize,3)
3: arrTestArray(intSize,0) = objRS("prenom")
4: intSize = intSize + 1
5: objRS.movenext
6: Next

I have this msg error:

Microsoft VBScript runtime error '800a0009'
Subscript out of range
Line 2
 
R

Ray at

You can only redimension the last dimension of an array.

Redim preserve anArray(2,4,2,43,VariableNumber)

Ray at work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top