Webbrowser locks first Excel Instance

Posted by figus on Stack Overflow See other posts from Stack Overflow or by figus
Published on 2010-05-19T17:05:35Z Indexed on 2010/05/19 17:10 UTC
Read the original article Hit count: 317

Filed under:
|
|
|

VB.NET 2008 - WinForms

Hi Everyone!

I've been looking for an answer to my problem but I only find more questions related to my problem...

The thing is that I'm using a AxWebBrowser control in VB.NET 2008 to open a excel file in a WindowsForm, it opens succesfully and everything... but the problem is this:

If I had a Excel File Open before opening another Excel File in my WebBrowser Control, the window that contains the file that was already open gets locked... (I can't give focus to that Excel window... If I click on it, the focus returns to my application)

I tried creating a new excel instance with CreateObject("Excel.Application") just before loading the file, but the WebBrowser locks the first Excel Instance...

Is there a way to lock it to the last instance???

I use the WebBrowser1.Navigate(Url) method to load the file... where Url is a String like C:\myExcelFile.xlsm

WebBrowser1.Document.Application.UserControl is also True, but it get's locked.

Any Suggestion??

Thanks in Advance!!!

© Stack Overflow or respective owner

Related posts about axwebbrowser

Related posts about vb.net