cancel
Showing results for 
Search instead for 
Did you mean: 

Excel VBO Create Instance Error - Could not execute code stage because exception thrown by code stage Cannot create ActiveX component.

MuraliKumar
Level 3
Hi, We are noticing that sometimes when we create an excel instance using the Create Instance action of Excel VBO object, we get the following exception - "ERROR: Internal : Could not execute code stage because exception thrown by code stage: Cannot create ActiveX component". This happens randomly without any pattern or warning. Has anyone encountered such errors before and found a solution to it? We have tried restarting the machine a few times but that does not fix the issue. And suddenly it starts working again without any changes from our side. Thanks MK
6 REPLIES 6

KirankumarMahan
Level 4
Hi Murali, check whether your using older verion of Excel VBO with new version blue prism. if your using older verion please import new VBO into your BP to resolve the issue. Regards, Kirankumar Mahanthi.

MuraliKumar
Level 3
Hi Kirankumar, We are using the same compatible version of Excel VBO with the same version of BP. We have not changed our BP version or the Excel VBO version from day 1. As mentioned, this error happens suddenly and then disappears suddenly, with no pattern. We are desperate for some guidance on how to detect what is causing this issue and how to fix it, as it is happening more and more frequently MK

Akhlesh_KumarJi
Level 4
Hi Murali, I faced the same error earlier. I was running Process on runtime resource. I figured out MS Office was not installed on that runtime resource. After installing MS Office error disappeared. So may be in your case BP is not able to find MS excel. Regards Akhilesh

MelissaSuarez_G
Level 6
This normally happens when you use the ""Create Instance""/""Close Instance"" actions multiple times in the same process. The best practice is to use that action at the very beginning of you process and then call the ""Close Instance"" at the very end.

MuraliKumar
Level 3
Hi Melissa, Thanks for this tip. Do you normally use Close Instance with the handle passed in as input parameter, or do you use Close All Instances just to be safe and close any open instance of Excel? MK

MelissaSuarez_G
Level 6
I normally follow these steps to close Excel: 1) Use the action Close All Instances 2) Wait 5 seconds 3) Check if the process called ""EXCEL"" is still running 4) If it's running, terminate it. If it's not running it means that Excel was successfully closed.