Choose right version of MSXML2.XMLHTTP ???? RRS feed

  • Question

  • In an Access app I create an object with this code

        Set Xmlhttp = CreateObject("Msxml2.XMLHTTP.6.0")
        If err Then Set Xmlhttp = CreateObject("Msxml2.XMLHTTP.5.0")
        If err Then Set Xmlhttp = CreateObject("Msxml2.XMLHTTP.4.0")
        If err Then Set Xmlhttp = CreateObject("Msxml2.XMLHTTP.3.0")
        If err Then Set Xmlhttp = CreateObject("Msxml2.XMLHTTP.2.6")
        If err Then Set Xmlhttp = CreateObject("Msxml2.XMLHTTP.2.0")

    but on 2 different pc's with the SAME version 3.0 installed (I have tested with an web-site facility somewhere) it works on the one but NOT on the other.

    I have tried "a multiversion"-version with this

    Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP")

    and it works on my pc with no error, BUT ...

    can I declare a "multiversion"-object this way and be shure it works in all cases ?

    Best regards KSor, Denmark
    Thursday, January 7, 2010 9:23 AM

All replies