Читать книгу Excel 2019 Power Programming with VBA - Michael Alexander, Dick Kusleika - Страница 172
TIP
ОглавлениеWhen you declare an array, you need to specify only the upper index, in which case VBA assumes that 0 is the lower index. Therefore, the two statements that follow have the same effect:
Dim MyArray(0 To 100) As Integer Dim MyArray(100) As Integer
In both cases, the array consists of 101 elements.
By default, VBA assumes zero-based arrays. If you would like VBA to assume that 1 is the lower index for all arrays that declare only the upper index, include the following statement before any procedures in your module:
Option Base 1