Consulting

Results 1 to 3 of 3

Thread: Solved: Check Internet Explorer Version from Excel

  1. #1
    VBAX Regular
    Joined
    Apr 2009
    Posts
    19
    Location

    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.

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    [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]

  3. #3
    VBAX Regular
    Joined
    Apr 2009
    Posts
    19
    Location
    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
  •