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 = "http://real-chart.finance.yahoo.com/table.csv?s=AAPL&g=d&ignore=.csv"
Set http = CreateObject("MSXML2", "XMLHTTP")
http.Open "GET", qurl, False
http.Open
strCSV = http.responseText

 

Question Info


Last updated October 1, 2019 Views 691 Applies to:
Answer
Answer
This code did not work in Excel either, because the function name is misspelled. It should be CreateObject.
-Tom.
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.