-
Solved: Check Internet Explorer Version from Excel
I have a macro that is grabbing data from Excel and Inputing into a Web-Based application. I want to check the version of Internet Explorer the user has and if it's version 8 or higher continue with running macro if it earlier than version 8 popup a message box requesting they install version 8 or 9.... Can someone show me what the code would be for this? Any help is greatly appreciated.
-
[vba]Sub IEVersion()
Dim ie As Object
Set ie = CreateObject("internetexplorer.application")
ie.Visible = False
ie.Navigate "about:blank"
'wait for page to load
Do While ie.Busy And Not ie.readyState = 4:
Application.Wait (Now + TimeValue("0:00:02"))
DoEvents
Loop
ie.document.parentWindow.execScript "document.clear(); document.write(navigator.appVersion);"
MsgBox Split(ie.document.DocumentElement.outerText, ";")(1)
ie.Quit
Set ie = Nothing
End Sub[/vba]
-
Thanks Mr. Hobs that was what I needed...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules