Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Array

Status
Not open for further replies.

Brian56

Programmer
May 29, 2003
66
CA
I know what an array is and how to use one but just what is meant by dynamic array.
 
A dynamic array is one whose size can be changed at run-time.

Dim myArray() as String

sets up a dynmamic array. When you know how big it needs to be you can set it's size:

ReDim myArray(10) as String

If you later want to increase it's size, but retain it's values, use:

ReDim Preserve myArray(15) as String

See also ReDim in VBHelp


________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Many Thanks

Just what I needed to know.

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top