Reeds
asked on
How to declare and initialise dynamic arrays in VB script?
I have a for loop in which I am reading from an excel file. I want to put some values in an array. I tried doing:
i = 0
Dim arrayClientOrderID()
arrayClientOrderID(i)= ClientOrderID
i = i + 1
The above gives me an error. I don't know the size of the array because I am looping through each line of the excel file and taking the values for Client orderID. How can I assign and initialize dynamic arrays.
i = 0
Dim arrayClientOrderID()
arrayClientOrderID(i)= ClientOrderID
i = i + 1
The above gives me an error. I don't know the size of the array because I am looping through each line of the excel file and taking the values for Client orderID. How can I assign and initialize dynamic arrays.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
works, thanks
Reeds, please accept an answer to close this question.
Thanks,
Rob.
Thanks,
Rob.
ReDim Preaserve arrayClientOrderID(i)
arrayClientOrderID(i)= ClientOrderID