Invoke VBA Execution Error

I have added the Invoke VBA function to initiate a macro that refreshes all connections on the ‘Data’ tab in excel in the ‘Queries and Connections’ area. I decided on this because the type into/send hotkey functions were unsuccessful when using the CTRL+A+R+A combo.

When the robot runs, it works okay until it gets to the Invoke VBA step and I have repeatedly gotten the same error, shown in the screenshot below:


The full script of the error is here:
An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Runtime.InteropServices.COMException: Name conflicts with existing module, project, or object library
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Has anybody encountered this issue before/know a way around it? I’ve seen some discussions on checking boxes on/off within the VBAProject references window inside visual basic but haven’t had any luck there either.

Thank you,


Hey there…

Instead of VB scripting have you tried running a Macro?

-Execute Macro activity in UiPath will get things done.

If you don’t want macro enabled on the file you want to run then, create a separate file with macro code in it and reference the file on which you want to run the macro which will give you the same result but faster and cleaner.

Tell me if you face any issues… :slight_smile:


1 Like