Articles → AUTOMATION ANYWHERE → Pass Parameters In VBA File Using Automation Anywhere And Return A Value
Pass Parameters In VBA File Using Automation Anywhere And Return A Value
VBA File
- Open notepad or any other text editor.
- Save it with test.vbs.
- Write following code in test.vbs
' Input parameters
MsgBox WScript.Arguments.Item(0)
MsgBox WScript.Arguments.Item(1)
' returning value
WScript.StdOut.WriteLine WScript.Arguments.Item(0) & WScript.Arguments.Item(1)
Automation Anywhere Code
- Drag and drop ‘Run Script’ and add following parameters
Click to Enlarge
- Display the return value using message box
Click to Enlarge
Output
Click to Enlarge
Click to Enlarge
Click to Enlarge