Using Webquery via VBA
Thanks, Don.
I have another question to ask you. Is there a way to break out the tab-
delimted results to separate cells ? If you can just point me in the
general direction that would be great.
"Don Guillett" wrote in news:OKmUgLGuDHA.2408
@tk2msftngp13.phx.gbl:
This may give you some idea
X = [quotes!a65536].End(xlUp).Row
For Each c In Sheets("quotes").Range(Cells(5, 1), Cells(X, 1))
symbols = symbols & "+" & c
Next
URLAddress = "http://finance.yahoo.com/d/quotes.csv?s="
mystringend = symbols & "&f=snd1t1l1ohgpv&e=.csv"
qurl = URLAddress + mystringend
With Sheets("Data").QueryTables.Add(Connection:="URL;" & qurl, _
Destination:=Sheets("Data").Range("b2"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
|