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




  1. Open notepad or any other text editor.
  2. Save it with test.vbs.
  3. Write following code in test.vbs
  4. ' 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




  1. Drag and drop ‘Run Script’ and add following parameters
  2. Picture showing the Run Script command in automation anywhere

    Click to Enlarge



  3. Display the return value using message box
  4. Picture showing the message box command to show the value of the $test$ variable

    Click to Enlarge



Output


Picture showing the output of passing the parameters in VBA file using automation anywhere

Click to Enlarge

Picture showing the output of passing the parameters in VBA file using automation anywhere

Click to Enlarge

Picture showing the output of passing the parameters in VBA file using automation anywhere

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Thursday, May 16, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250