VBA 選項關鍵字
通過明確宣告邊界而不是讓編譯器回退到 Option Base {0|1}
宣告來更容易控制陣列的邊界。這可以這樣做:
Dim myStringsA(0 To 5) As String '// This has 6 elements (0 - 5)
Dim myStringsB(1 To 5) As String '// This has 5 elements (1 - 5)
Dim myStringsC(6 To 9) As String '// This has 3 elements (6 - 9)