DECLARING ARRAYS

Before you use an array, you must declare it.

An array is declared with a Dim or a Public statement, just like a regular variable. However you also must specify the number of elements in the array by specifying the first index number, the keyword to, and the last index number, all within the parentheses.

For example,

Dim Score(1 to 65) As Integer
If only the upper index number is specified, then VBA assumes the default lower index number of 0.

For example the following declarations are equivalent and gives a 101-element array of doubles.

Dim MyArray(100) As Double
Dim MyArray(1 to 100) As Double
This default lower index number can be changed to 1 by including the following statement in the Declarations section of your module

Option Base 1
In that case the following declaration are equivalent and gives a 100-element array of doubles.
Dim MyArray(100) As Double
Dim MyArray(1 to 100) As Double