Test IE Object RRS feed

  • Question

  • after run the following in Excel VBA, Internet Explorer is open and can be used to search. If IE is manually closed, ie object is not valid anymore, no any child, properties. How to test and find out if it is closed? I tried to use IsNothing(ie), IsEmpty(ie), IsObject(ie) but none of them work. Please advise. Thanks.

    Set ie = CreateObject("internetexplorer.application")
    ie.navigate ""
    ie.visible = True

    Monday, November 2, 2015 11:34 AM


  • Try using the TypeName function...


    When IE is closed, TypeName returns "Object" instead of returning the name of the actual object.

    Hope this helps!

    Domenic Tamburino Microsoft MVP - Excel - "For Your Microsoft Excel Solutions"

    • Marked as answer by Ian3 Tuesday, November 3, 2015 12:55 AM
    Monday, November 2, 2015 3:05 PM