View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
armsiee armsiee is offline
external usenet poster
 
Posts: 11
Default 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?