index, item_1[,item_2, ...[, item_n]])
An expression that evaluates to the (1-based) index of the object to choose from the list
A comma-delimited list of values from which to choose, or a ParamArray containing values from which to choose
The object chosen from the list.
Programmatically selects an object from a predefined list of objects (which are passed as parameters to the function) based on its ordinal position in the list. Using Choose is a simpler alternative to populating an array with fixed values.
The list of items is based from 1, rather than the more usual VB default base of 0.
Because the list consists of objects, you can mix data types within
the list; you are not forced to use the same data type for each item
in the list. For example,
item_1 can be a
item_2 can be a long
item_3 can be a floating
If the rounded value of
index does not
correspond to an item in the list, the function returns a null
index is not a whole number, it is
rounded before being used.
It is important to note that all items in the list are evaluated. Thus, if we use functions or expressions as parameters, all of the functions are called or all of the expressions are evaluated.
item_n in the form of a ParamArray, ...