cancel
Showing results for 
Search instead for 
Did you mean: 

Calling macro with Parameters

PoojaSabharwal
Level 2
Hi, Usually, its defined  "Test(" &[Data3]& [TerminationFile]&[Data3] &"," &[Data3]& [UserList]&[Data3]&")"  to call a macro having parameters from BP, where Data3 = " terminationFile = File Path UserList = FilePath   It calls the params and prints MsgBox, but it further calls Load_Xlxs(terminationFile ,UserList ), it fails, saying: The macro may not be available in this workbook or all macros may be disabled.   Any Clue?  
1 REPLY 1

VijayDodamani
Level 5
Hello Pooja, By default this method is not available in MS Excel VBO. You need to extend the VBO for this. Below are the steps to extend/append the functionality you needed: Open MS Excel VBO Duplicate the action call ""Run Macro"" which by default available in VBO Change the name of action which is newly created Modify the start parameter for newly created action (Note: This action should also get the input parameter to hold the values) Double click on code stage and pass the input parameter for the code stage. Click on Code tab --> modify the code as below: lets consider, you need pass the 2 variable to macro then Modify the statement : GetInstance(Handle).Run(Macro_Name,param1,param2) click on ok - > publish and save the newly created action Use the newly created action in your process.