Invoke VBA: Object is not connected to server (Exception from HRESULT: 0x800401FD (CO_E_OBJNOTCONNECTED))

Hi All, I’m facing the issue Invoke VBA: Object is not connected to server (Exception from HRESULT: 0x800401FD (CO_E_OBJNOTCONNECTED)). Any help will be appreciated. The issue is present when trying to update pivot tables from Excel workbook.

Can you confirm the VBA works correctly when you run it from Excel without UiPath?

And have you enabled macros and enabled Trust access to the VBA project object model in the Excel Trust Centre settings?

Hi @daniel_felipe_garcia_torr

is the invoke activity within a excel application scope card?
is your trust center enabled?

Regards

Hi, Yeah, the process used to work without any problem in the past. Macros are enabled.

Hi, I added the new location folder. I’ll check and let you know.

Are there any errors or pop up windows from Excel when the UiPath error occurs?

Hi @daniel_felipe_garcia_torr ,

Here are some troubleshooting steps you can try:

  1. Ensure that Excel is running and the workbook containing the VBA code is open.
  2. Make sure that the security settings in Excel are not blocking the VBA code from running. You can check the settings by going to File > Options > Trust Center > Trust Center Settings > Macro Settings.
  3. Check that the Excel version on the system where the VBA code is running is compatible with the version of Excel where the code was created.
  4. Try restarting Excel and running the VBA code again.
  5. If none of the above steps work, try recreating the pivot table and updating it using a different method, such as using Excel’s built-in functions or a different third-party tool.

If the issue persists, it may be helpful to provide more details about the specific code you are using and the version of Excel you are running.

@daniel_felipe_garcia_torr

Did you try using this activity instead?

Cheers

After dealing with the same problem for a few hours, I determined that the problem was caused by a “frame” that I accidentally created in the relevant userform.
There may be an object left in the userform that you did not notice. In this case, my suggestion is to recreate the userform.