GetVariableName method
The GetVariableName method gets the name (ID) of a variable from the index of the variable. You can use this method when you know the position of a variable within an object, but you do not know the name of the variable.
Syntax
- VBScript
oDCO.VariableName(nIndex subscript as Long) as String
- C#
string GetVariableName(int nIndex)
Applies to
All objects.Arguments
- nIndex
- The index of the variable.
Returns
Returns the name of the variable; returns an empty string if a variable with the specified index does not exist.VBScript example
This example returns the name of the third variable in a field object.Dim VarID
VarID = objField.VariableName(2)