I'm unsure if I understand your problem... so I'll try tp explain what arrays are:
Definition
An array is a collection of values of the same type
Usage
You need an array where ever you have to do something for more than 1 variable coz you can use a loop then. For example if you make a game and you want to move enemies, without arrays you'd have to do something like this:
If you instead use an array you can replace much code:Code:Dim Enemy1 Dim Enemy2 Dim Enemy3 ... Enemy1.Move Enemy2.Move Enemy3.Move
See the difference? Another good thing is that you can change the size of an array at runtime:Code:Dim Enemy(5) ... Dim A as Long For A = 0 to 5 Enemy(A).Move Next
(While preserve means that A does not lose the values already contained when resizing)Code:Dim A() as long ReDim A(10) 'Set a size ReDim Preserve A(20) 'Make it bigger ReDim Preserve A(5) 'and smaller...




Reply With Quote