RPAEngine.SetVar

The RPAEngine.SetVariableValue function sets the value of the specified variable.

Syntax

RPAEngine.SetVar( _

ByVal strVariableName As String, _

ByVal strValue As String) As Boolean

Parameters

strVariableName

[in] The name of the variable who's value will be set.

strValue

[in] The value to store in the variable.

Return Value

The function returns True if the variable value was successfully set.

The function returns Falseif the variable value could not be set.

Remarks

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

Example: The code below sets the value of a variable named VariableA to "NewValue".

If RPAEngine.SetVar("VariableA", "NewValue") = True Then

   Msgbox "Success", vbInformation, "Result"

Else

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

End If