Access 2010 VBA XMLHttprequest

I have been using the following code in Excel 2010 VBA to download stock data. I enabled the reference to the Microsoft Office 14.0 Object Library to get the code to work.

I want use the same code in Access 2010 VBA, but get an error message that the CreatObject() function is not defined.

Can anyone offer suggestion on the proper Access reference. Or other methods to get working.

Thank you.

qurl = ""
Set http = CreateObject("MSXML2", "XMLHTTP")
http.Open "GET", qurl, False
strCSV = http.responseText


Question Info

Last updated April 26, 2020 Views 845 Applies to:
This code did not work in Excel either, because the function name is misspelled. It should be CreateObject.
Microsoft Access MVP
Phoenix, AZ

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.