View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
duane duane is offline
external usenet poster
 
Posts: 64
Default Downloading stock data

Help,

The follow code runs great in Windows 2000 and Excel 2000. I can download
data for over 3000 stocks in less than 3 seconds. But it doesnt run at all
in Vista 64 bit and Excel 2007. It errors out
in the €ś .Refresh BackgroundQuery:=True €ś line with a €śRun time error 1004
An unexpected error has occurred€ť message. I wasnt expected it, so I guess
it really is unexpected!

CODE
Set AllStockDataWorksheet = Workbooks(1).Worksheets(2)
Set AllStockDataResults = AllStockDataWorksheet.QueryTables _
.Add(Connection:="URL;http://finance.yahoo.com/d/quotes.csv?s=" &
Left(SymbolString, Len(SymbolString) - 1) & "&f=l1va2&e=.csv", _
Destination:=AllStockDataWorksheet.Cells(RowNumber , 51))

With AllStockDataResults
.Refresh BackgroundQuery:=True
End With

Any help will be appreciated.

Duane