MS Excel VBO - Run Macro with ParamArray

#1
Hi, I'd like to update Action - "Run Macro" in MS Excel VBO to accept variable number of arguments. So a robot will run 2 macros: Sub First(country as string) and Sub Second(country as string, population as long, isDuplicate as boolean). Since I cannot put in code stage fixed number of arguments, I'd like to pass a single row collection as input to Excel VBO and in code stage to loop each data column of collection to check if it has value. Since I'm not familiar with VB.NET, I'd like to ask you how to write that loop.
 
#2
did you have converted macro into RPA/ Blue prism solution? Can you please guide me what exactly this was for your case? I am working on similar project.

Thanks,
Jigi Patel
 
#3
I have a partial solution. I pass arguments as collection. Problem is Number data type in Blue Prism which represents Decimal data type, that is not present in VBA. Also specific VBA object types like Range or Worksheet do not have equivalents to data types in Blue Prism's drop down. So I change parameters in VBA (integer to variant, range to string) to adapt to this.
 
#4
I have a partial solution. I pass arguments as collection. Problem is Number data type in Blue Prism which represents Decimal data type, that is not present in VBA. Also specific VBA object types like Range or Worksheet do not have equivalents to data types in Blue Prism's drop down. So I change parameters in VBA (integer to variant, range to string) to adapt to this.
In Bluerpism -I have selected parameter 1 type as Number and respective parameter in VBA has been declared as Variant( changed from integer to variant).
When i pass parameter 1 value as 3000 or 4000 to Run Macro action, its working fine.

When i pass parameter 1 value as 20000, then am getting below error in excel VBA:
Error:
Run time error '1004' error.
Selection too long


Then i tired changing parameter 1 type in VBA(from variant to double)

Am getting below error in blueprism :
Internal : Could not execute code stage because exception thrown by code stage: Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))

Kindly suggest the type parameter1 should be changed in (VBA), so that it can accept 30000 or 40000 as parameter value from blueprism
 
Top