34,333
edits
Changes
→Assigning Values to Individual Array Elements
<pre>
intNumbers(1) = 25
</pre>
A ''For'' loop can also be used to assign multiple values to an array.The following code excerpt loops through the elements of an array assigning the current value of the loop counter to the corresponding array element:
<pre>
Dim intNumbers(10) As Integer
For intCount = 0 To 10
intNumbers(intCount) = intCount
Next intCount
</pre>