Jason,
As for the smf_addin:
The smf_addin requires you to setup a Yahoo! profile and subscribe to the
group. Once you subscribe, you will have access to the download links.
As for the Yahoo! download:
I've provided a function below that illustrates the XMLHTTP you are looking
to mimic. Simply run "Test" to see how it works. The result of "Test" is
printed to the Immediate Window (View | Immediate Window).
Best,
Matt
Sub Test()
Dim strText As String
Dim strURL As String
strURL =
"
http://ichart.finance.yahoo.com/table.csv?s=APOL&a=10&b=13&c=2004&d=10&e=13&f=2009&g=d"
strText = GetYahooPricingAsString(strURL)
Debug.Print strText
End Sub
Function GetYahooPricingAsString(strURL As String) As String
'---------------------------------------------------------------------
'INFO: 11/12/2009, Matthew Herbert
'---------------------------------------------------------------------
'PURPOSE: This will go to Yahoo!'s website and pull down a stock's
' webpage pricing data from the specified URL (using
' XMLHTTP) and return the result as a string.
'
'strURL The full URL path for the ticker. It is recommended that
' the ConstructYahooURL function be used to create the
' appropriate strURL. - I didn't include ConstructYahooURL in this
post.
'---------------------------------------------------------------------
Dim objXMLHTTP As Object
Dim strText As String
'create the XMLHTTP object
Set objXMLHTTP = CreateObject("Microsoft.XMLHTTP")
'query the server
With objXMLHTTP
.Open "GET", strURL, False
.send
strText = .responseText
End With
'return the result
If objXMLHTTP.statusText = "OK" Then
GetYahooPricingAsString = strText
Else
GetYahooPricingAsString = ""
End If
End Function