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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Static Web Query 1
Web Queries? 1
Excel Web Query 1
When a web query fails. 2
Trying to create a list of prices from a web page 2
Web Queries 1
Web Query 19
Counting multiple memberships 1

Back
Top