RPAEngine.GetVar

The RPAEngine.GetVar function retrieves the value of the specified variable.

Syntax

RPAEngine.GetVar( _

     ByVal strVariableName As String, _

ByRef strValue As String) As Boolean

Parameters

strVariableName

[in] The name of the variable containing the value to retrieve.

strValue

[out] The value retrieved from the variable.

Return Value

The function returns True if the value was successfully retrieved from the variable.

The function returns Falseif the value could not be retrieved from the variable.

Remarks

If the function call fails, make sure a variable exists with the name you specified.

Example

The code below retrieves the value from a variable named VariableA, stores it in a variable named strValue, then displays it in a message box.

Dim strValue

 

If RPAEngine.GetVar("VariableA", strValue) = True Then

   Msgbox strValue, vbInformation, "Result"

Else

   Msgbox "The value could not be retrieved.", vbCritical, "Result"

End If