Is Variable Set Method
The Is Variable Set method determines if a variable of data type variant is set. To indicate that it contains no data, every new variant defaults to an Empty type. This method returns one of the following values:
-1 (negative one). The variant is set.
0 (zero). The variant is not set.
If you use an empty variant in a numeric expression or in a null string ("") in a string expression, then Siebel VB converts this empty variant to zero. For more information, see Variants.
Format
IsEmpty(expression)
The following table describes the arguments that you can use with this method.
Argument | Description |
---|---|
expression |
Any expression that identifies a variable of data type variant. |
Example
The following example prompts the user for a series of test scores. It uses the Is Variable Set method to determine if Siebel CRM reached the maximum allowable limit. This method determines when to exit the Do Loop:
Sub Button_Click
Dim arrayvar(10)
Dim x as Integer
Dim tscore as Single
Dim total as Integer
x = 1
Do
tscore = 88
arrayvar(x) = tscore
x = x + 1
Loop Until IsEmpty(arrayvar(10)) <> -1
total = x-1
msgtext = "You entered: " & Chr(10)
For x = 1 to total
msgtext = msgtext & Chr(10) & arrayvar(x)
Next x
End Sub