Choose function
Summary
Choice by index.
Syntax
Choose(index, choice-1, [ choice-2, ..., [ choice-n ]] )
The Choose function syntax has these parts:
Part
Description
indexRequired. Numeric expression or field that results in a value between 1 and the number of available choices.
choiceRequired. Variant expression containing one of the possible choices.
Part
Description
indexRequired. Numeric expression or field that results in a value between 1 and the number of available choices.
choiceRequired. Variant expression containing one of the possible choices.
Example
Example
This example uses the Choose function to display a name in response to an index passed into the procedure in the Ind parameter.
Function GetChoice(Ind As Integer)
GetChoice = Choose(Ind, "Speedy", "United", "Federal")
End Function
This example uses the Choose function to display a name in response to an index passed into the procedure in the Ind parameter.
Function GetChoice(Ind As Integer)
GetChoice = Choose(Ind, "Speedy", "United", "Federal")
End Function