简体   繁体   中英

Cannot create ActiveX component in Vb.net

I am facing a problem in vb.net forms application. I'm loading the Internet Explorer using the following code.

Dim browser As Object = CreateObject("InternetExplorer.Application")
browser.Visible = TRUE

When creating the application for first time, it works fine. Loads the Internet Explorer correctly. But for second time if run the application the following run time error is occurring.

Cannot create ActiveX component at the CreateObject line.

I don't know what is wrong with the application and I searched and google lot but did not find the solution.

Thanks in Advance.

If you're using library Interop.Excel or Interop.Work, It has caused too many processes (Excel.exe or Work.exe), you have to End Process that process.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM