Option Base 1
All arrays start at 0. by default.
All arrays have a lower bound of zero, by default.
These 11 items can be accessed using the following notation:
Using To
The lower bound should always be explicitly stated using the "To" keyword in the declaration.
The following two lines are equivalent:
The lower bound can also be changed using the "To" keyword.
All arrays will start at zero unless they are explicitly defined to start at another number.
Using Option Base 1
You can use the "Option Base 1" declaration at the top of a code module to change the default lower bound to 1 instead of 0.
The following two lines are equivalent when using Option Base 1:
This statement only affects the module it is declared in.
Never use Option Base 1
There is no need to use this declaration as changing the default behaviour will confuse people.
If you want an array that starts at position 1 (instead of position 0) just use the To keyword to define the lower bound.
Split Function Uses Base 0
SPLIT - Returns an array containing a specified number of substrings.
This VBA function will always return an array which is 0 based.
Excel Ranges Use Base 1
When an array is populated straight from a range the array will start at 1 and not 0.
For more information refer to the Cells & Ranges > Working With Arrays
ParamArray
The Option Base statement does not apply to the ParamArray keyword.
ParamArrays always start at index position 0.
Important
This can only be changed on a per module basis.
If you have more than one module containing array manipulations you need to add this statement to the top of every code module.
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext