6.1.2.8.1.2 Choose

Function Declaration

 Function Choose(Index As Single, ParamArray Choice() As Variant) 

Parameter

Description

Index

Numeric expression that results in a value between the data value 1 and the number of available choices.

Choice

A ParamArray argument containing all the functions arguments starting with the second argument.

 

Runtime Semantics.

§ Returns a value from its list of arguments.

§ Choose returns a value from the list of choices based on the value of index. If Index is n, Choose returns the n-th element of the Choice ParamArray.

§ The Choose function returns the data value Null if Index is less than 1 or greater than the number of choices listed.

§ If Index argument is Let-coerced to declared type Integer before being used to select