Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to append an element to an array variable.
For example (I need something like):

dim arraystr() as string

for i=0 to 10
arraystr += i
next

output:

len(arraystr)=10


How to do it?
Posted
Updated 18-Dec-14 2:13am

1 solution

Please, see this: Array in VB[^]

VB
Dim s() As String
Dim i As Integer

For i = 0 To 9
    ReDim Preserve s(i)
    s(i) = i
Next

MsgBox UBound(s())
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900