View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
poolboy poolboy is offline
external usenet poster
 
Posts: 2
Default Multiple Web Queries on background fail

Here is the macro:

Sub GetShareInfo()

For I = 0 To 10
StockCode = Sheets("Codes").Range("A1").Offset(I, 0).Value
With Sheets("Codes").QueryTables(I)
.Connection = "URL;http://finance.yahoo.com/q?s=" & StockCode
.WebSelectionType = xlSpecifiedTables
.WebTables = "27"
.Refresh BackgroundQuery:=True
End With
DoEvents
Next

End Sub


"poolboy" wrote in message
...
I have tried to use a macro to launch several webqueries to be run

parallel
on the background (async), but I got "Invalid Web Query" error. Any ideas?
have anyone tried other methods than QueryTable?
I'm using Excel 2000.