Web Query

  • Thread starter Thread starter Matt Day
  • Start date Start date
M

Matt Day

Is there a way to dynamically feed the Web Query in Excel a URL? For
instance, if I have a a URL in a cell that changes due to work that I do on
the spreadsheet, can a Web Query be assigned that URL automatically or
through my code?

Thanks

Matt Day
 
This idea might help
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
 
Back
Top