I have a webservice that returns the following XML:
<CntrDatePriority xmlns="http://myproject.mycompany.com"> <ContractualShipDate>10/31/2008</ContractualShipDate> <Priority>Normal</Priority></CntrDatePriority>
When I attempt to retrieve the ContractualShipDate as below in my Access 2003 ADP VBA, I get no ParseError. But I get the dreaded and much disliked - "Object variable or With Block Variable Not Set" error.
Dim xmlResult As New MSXML2.DOMDocument60
Dim objNode As IXMLDOMNode
Set objNode = xmlResult.documentElement.selectSingleNode("ContractualShipDate")
ProdDate = objNode.Text
It fails even with MSXML2.DOMDocument40.
However it works for MSXML2.DOMDocument and MSXML2.DOMDocument26
Please help me understand this. Thank you.
Please Check your reference items in VBE.(tools--references--refereneces dialogs box)
And what is your IE version?
So, I thought there were two possible situations:
1. if you set the reference: Microsoft XML, v2.6 or v3.0
2. if your IE is too old to suport v4.0 or above
Thank you for responding.
IE version is 7, OS - XPSP2 with all the latest service packs and updates.
I set the reference to MS XML 6.
You get any solution for this query.I change my reference to ms xml 6 is there any disadvantage.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?