FindVariable method
The FindVariable method returns the index of a variable by using the ID (name) of the variable. You can use this method when you need to pass the value of a variable to another variable or action.
Syntax
- VBScript
oDCO FindVariable (lpszName as String ) Variables Index subscript as Long
- C#
int FindVariable(string lpszName)
Arguments
- lpszName
- The variable ID (name).
Returns
Returns the index of the specified variable, where 0 is the first variable; Returns –1 if the specified variable is not found.Applies to
All objects.VBScript example
This example returns the index of the Length variable, and displays the index in a message box:Dim VarLength
varLength = oDCO.FindVariable("Length")
if varLength > 0 then
msgbox oDCO.Variable(varLength)
end if