PDA

View Full Version : IXMLHTTPRequest basic problem


dror2002
08-24-2003, 11:45 AM
Hi,

I'm trying to retrieve web data in excel. So started off with a simple example from Microsoft help page (the page is at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk30/htm/xmobjxmlhttprequest.asp )

the code is very straight forward and short:

Private Sub Command1_Click()
Dim HttpReq As New MSXML2.XMLHTTP

HttpReq.open "GET", "http://XMLSampleServer/CatalogServer.asp", False
HttpReq.send
MsgBox HttpReq.responseText
End Sub


The problem is that I get a "compile error: user-defined type not found" for the second line which is (Dim HttpReq As New MSXML2.XMLHTTP) and relates to the MSXML2.XMLHTTP object.

Later on the Microsoft page the requirement stated are:

Requirements
Implementation: msxml3.dll, msxml2.lib

[C/C++]
Header and IDL files: msxml2.h, msxml2.idl

Version-Independent ProgID: Msxml2.XMLHTTP

Version-Independent CLSID: F6D90F16-9C73-11D3-B32E-00C04F990BB4

Version-Dependent ProgID: Msxml2.XMLHTTP.3.0

Version-Dependent CLSID: f5078f35-c551-11d3-89b9-0000f81fe221


So is that the problem and if so then how do I know what version of vba I have and whether dll files are included and if I don't have the updated version how do I add these fitures.

Please help, would be very greatful.

dror2002