The ValueTag attribute function can be used to determine the value of the tag of a picklist entry. If the function is called without specifying a parameter, the value of the tag expression of the current value of the variable is returned.
Syntax | ||||
ValueTag([Value As Variant]) | ||||
Return value | ||||
Variant | ||||
Parameter | ||||
Use |
Name |
Type |
Passing |
Description |
Optional |
Value |
Variant |
ByVal |
Value to determine its tag |
Example:
A variable ‘Color’ is defined as follows:
The execution of the following code
Dim Tag As Variant
Color := 'Red'
Tag := Color.ValueTag
…sets the variable Tag with the value 1001.
Tag := Color.ValueTag('Green')
…sets the variable Tag with the value 1003.