ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   IE ActiveX Settings Launched from Excel (https://www.excelbanter.com/excel-programming/453908-ie-activex-settings-launched-excel.html)

armsiee

IE ActiveX Settings Launched from Excel
 
Excel 2010 / Windows 7

Currently developing a solution where i want to utilise some HTML5 & Javascript functionality.

I have developed webpage which functions fine working locally within IE11 which applies some javascript and creates a link which downloads a file when clicked.

My plan is to launch the webpage from Excel form encapsulated by the InternetExplorer object by Referencing MicrosoftInternetControls:

Option Explicit
Private WithEvents IE As InternetExplorer


Private Sub cmdLaunch_Click()

Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate ("localWebPage")

end sub

Private Sub IE_OnQuit()

Set IE = Nothing
... do some stuff with saved file

End Sub

However, every time I run the code I get a warning about running ActiveX Controlsand making InternetExplorer my default browser. Even when I accept these when I click on the download link I've created nothing happens as if the link has been disabled (again this works finally when running directly in IE).

I've scrolled through the properties on the IE object and cannot see anything obvious i could change apart from running in Offline mode but that did not make any difference.

I suspect the IE object is a cut down version of IE itself. I know I could access IE or Chrome via a shell command, but then how do I keep a handle on the object so that I can continue processing with Excel when the page is closed?



Living the Dream

IE ActiveX Settings Launched from Excel
 
Hi Armsiee

Have you tried

With Application
..DisplayAlerts = False
End with

Then at the end of your code you need to turn it back on again.

With Application
..DisplayAlerts = True
End with

GS[_7_]

IE ActiveX Settings Launched from Excel
 
Why not just download the file directly from Excel?




All times are GMT +1. The time now is 11:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com