Unable to catch System.Runtime.InteropServices.COM Exception


I have used try-catch block to Catch this exception in multiple places. Yet the bot is unable to catch the exception and it stops the execution abruptly. I would want to catch this and continue with next transaction

Any suggestions?

1 Like

no worries
we can browse such kind of specific exception in the exception drop down


Kindly try this and let know for any queries or clarification
Cheers @SudhakarAs92

Hi ,
I already have that Exception included in the catch block where ever possible. Yet it throws the error.

1 Like

Try with System.Exception alone
hope that would take
Cheers @SudhakarAs92

were we able to handle that exception buddy
Cheers @SudhakarAs92

Not really… I have used try catch where ever possible and added system.exception, Comexception…
No luck yet.

were we running in debug mode only then those exception wont be caught by catch block
else it will for sure
Cheers @SudhakarAs92

It was not in debug mode. Just a normal run only.

if possible can i have a screenshot of how the catch block is used along the sequence
Cheers @SudhakarAs92

At the moment I’m unable to Share the screenshot.

Meanwhile, to brief it

An excel has 8 different macros that needs to be triggered sequentially.
1st and 2nd runs without an issue.
For rest of the macros to run, I will need another Excel file (file2 for example) to be left open.

File 2 was opened parallely, and 3rd macro triggered and it gave me subscript out of range popup, I clicked end to handle it.
The error occurs.

Problem is I have about 7 entities(transaction item)for which all these 8 macros have to be triggered. If this error pops up for 3rd entity it ain’t moving to next transaction item