
-----------------------------------
GlobeTrotter
Thu Mar 10, 2005 11:12 pm

How do you do flexible arrays in VB?
-----------------------------------
Any help would be appreciated.

-----------------------------------
Brightguy
Thu Mar 10, 2005 11:38 pm

Re: How do you do flexible arrays in VB?
-----------------------------------
For a dynamic array, don't include any array bounds in the declaration.  You can change the bounds using the ReDim statement.
Dim FlexArray() As Integer
Redim FlexArray(1 to 10) As Integer

If don't want the values in the array to reset when you resize it, add "Preserve" after ReDim.

-----------------------------------
GlobeTrotter
Fri Mar 11, 2005 12:48 pm


-----------------------------------
Thanks.
