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
"jason" wrote:
> On Nov 13, 1:45 pm, Matthew Herbert
> <MatthewHerb...@discussions.microsoft.com> wrote:
> > Jason,
> >
> > Also, you may want to check out the smf_addin by Randy Harmelink, which is
> > found on Yahoo! groups.
> >
> > Best,
> >
> > Matthew Herbert
> >
> >
> >
> > "jason" wrote:
> > > On Nov 13, 12:41 pm, jason <jason.mell...@gmail.com> wrote:
> > > > wrt:http://fransking.blogspot.com/2006/0...ces-into-excel....
> >
> > > > i am attempting to alter the code as to be able to retrieve historical
> > > > data for one equity at a time.
> >
> > > > any assistance would be fantastic.
> >
> > > > thank you
> >
> > > finance.yahoo.com/d/tables.csv?
> > > s=GS&d=10&e=13&f=2009&g=d&a=10&b=10&c=2006&ignore=.csv
> >
> > > using
> >
> > > public My_Func()
> >
> > > Set oXMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
> >
> > > oxmlhttp.open "GET", _
> > > "finance.yahoo.com/d/tables.csv?
> > > s=GS&d=10&e=13&f=2009&g=d&a=10&b=10&c=2006&ignore=.csv" _
> > > , False
> >
> > > result=oxmlhttp.responcetext
> >
> > > My_Func=result
> >
> > > this is the basic methodology currently.
> >
> > > .
>
> Matthew,
> I saw that, but was unable to find the download link as to peek under
> the hood. Any help with either of my issues would be largely
> appreciated.
> .
>