I really don’t understand why I am getting this error.
I am using Invoke VBA activity against my Excel sheet, and I am sending an array parameter, but I am getting
Invoke VBA: Number of parameters specified does not match the expected number
this is weird because they DO match. In my UiPath, I have:
Assign: arrayRenameColumns (of string) = {“A”, “B”, “C”, “D”, “E”, “F”, “1”, “2”, “3”, “4”, “5”, “6”}
Invoke VBA Properties
CodeFilePath - “correct macro path”
EntryMethodName - “mySubName”
EntryMethodParameters - arrayRenameColumns
Note: arrayRenameColumns is declared as variable.
Now inside Macro file, I have
Sub mySubName(ByRef arrColumns() As String)
/* More VBA code in here*/
End Sub
The number of parameters are both 1 on both sides, and it is an array of string. Why am I getting this error?