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

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

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

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

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated July 9, 2023 Views 113 Applies to: