VariableCollection.VarType Property
[Read-only] This property returns a number corresponding to the variable type. These values are enumerated in the ansType enumeration.
-
Invalid = 0
-
Text = 1
-
Number = 2
-
Date = 3
-
True/False = 5
-
Multiple Choice = 6
Syntax
Type (index)
Parameter | Description |
long index | The index into the VariableCollection of the variable. |
Example
' This example opens a variable collection and lists each variable's name and type. dim vc Set vc = Server.CreateObject ("HotDocs_Online.VariableCollection") vc.Open "c:\InetPub\wwwroot\templates\template.hvc" for i = 0 to (vc.Count -1) Response.Write "Name: " & vc.VarName(i) & "<br>" Response.Write "Type: " select case vc.VarType(i) case ansTypeText Response.Write "Text Variable" case ansTypeNumber Response.Write "Number Variable" case ansTypeDate Response.Write "Date Variable" case ansTypeTF Response.Write "True/False Variable" case ansTypeMC Response.Write "Multiple Choice Variable" end select Response.Write "<hr>" next