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 IntegerIf only the upper index number is specified, then VBA assumes the default lower index number of 0.
Dim MyArray(100) As Double Dim MyArray(1 to 100) As DoubleThis default lower index number can be changed to 1 by including the following statement in the Declarations section of your module
Option Base 1In 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