Syntax |
Choose(index,expression1,expression2,...,expression13) |
Description |
Returns the expression at the specified index position. |
Comments |
The index parameter specifies which expression is to be returned. If index is 1, then expression1 is returned; if index is 2, then expression2 is returned, and so on. If index is less than 1 or greater than the number of supplied expressions, then Null is returned. The Choose function returns the expression without converting its type. Each expression is evaluated before returning the selected one. |
Example |
This example assigns a variable of indeterminate type to a. Sub Main() Dim a As Variant |
See Also |
Switch (function); IIf (function); If...Then...Else (statement); Select...Case (statement). |
C |