Question Title: Using the WebBrowser Control to display Excel files
Author: speke
Points: 500
Date: 06/17/2004 02:12AM PDT
I would like to display Excel (.xls) files in the Webbrowser control but I am having the following problems:
1) If an instance of Excel is open, my application takes it over and makes my application modal to the instance of Excel. I have tried creating a new instance of Excel, but the application always takes control of the first instance.
2) On some of our test PCs, the Excel file launch in Excel itself and not in the browser control.
Any suggestions or solutions would be appreciated.
The problem can be replicated as follows:
Create a new VB6 project with one form.
Add the Microsoft Internet Controls object to the form.
Add a command button.
Add the following code:
Private Sub Command1_Click()
Me.WebBrowser1.Navigate "Name and location of file"
End Sub
Now open an instance of Excel, then run the VB application. Click the command button to launch the Excel Spreadsheet.
When you attempt to click on the Excel application it cannot get focus as the VB application is modal to the instance of Excel.
Author: speke
Points: 500
Date: 06/17/2004 02:12AM PDT
I would like to display Excel (.xls) files in the Webbrowser control but I am having the following problems:
1) If an instance of Excel is open, my application takes it over and makes my application modal to the instance of Excel. I have tried creating a new instance of Excel, but the application always takes control of the first instance.
2) On some of our test PCs, the Excel file launch in Excel itself and not in the browser control.
Any suggestions or solutions would be appreciated.
The problem can be replicated as follows:
Create a new VB6 project with one form.
Add the Microsoft Internet Controls object to the form.
Add a command button.
Add the following code:
Private Sub Command1_Click()
Me.WebBrowser1.Navigate "Name and location of file"
End Sub
Now open an instance of Excel, then run the VB application. Click the command button to launch the Excel Spreadsheet.
When you attempt to click on the Excel application it cannot get focus as the VB application is modal to the instance of Excel.