UiPath Crash while using Invoke VBA activity

There are two issues with the Invoke VBA activity that is causing UiPath to crash.
1 - When you are selecting EntryMethodParameters the intellisense does not auto populate the variables. You do get the drop down with the list of variables. If you click the variable the logic populates the variable with a period (.) In front of the variable.
2 - Issue number 1 causes UiPath Studio to lock up and crash. I had to use task manager to end task and restart UiPath. I’m unable to update the parameter values, because it’s locked up. So I ended up deleting the activity.

Hello @James_Taylor ,

A few things you can try:

Trust settings need to be enabled for the script to be executed

Per the documentation, you can provide a .txt file instead of a .vb file

The “.” appears when the variables are picked from the intelli-sense - you can remove the “.” after the variable is placed in the list. Basically, this is what I have done here below:

image

If I undestand correctly, this is an error resulting from the underlying VB.NET /C# requirements because this rule is imposed with the use of the “With” keyword to work with objects . For example:

Dim someObject As New SomeObject
With someObject 
    .prop1 = "something"
   .prop2=2
End With

As the data type of the EntryMethodParams is an IEnumerable, the compiler seems to be expecting a With statement.

If you find that “.” annoying, you can do this instead when populating the EntryMethodParams

New List(Of Object) From { n}

I would prefer to populate this collection outside in an assign activity and then pass it to the EntryMethodParams parameter.

I hope this helps.

Thanks!