Variable in Address

  • Thread starter Thread starter Gordon
  • Start date Start date
G

Gordon

I am trying to use a variable in an address to call up historical
prices for stocks out of Yahoo.

With ActiveSheet.QueryTables.Add(Connection:="URL:htto://finance.
yahoo.com/q/hp?s=ibm", Destination:=Range("A1"))
..Name = "hp?s=ibm"
ect................

Thanking you in advance
Gordon
 
Maybe...

dim mySym as string
mySym = "ibm"
With ActiveSheet.QueryTables.Add _
(Connection:="URL:http://finance.yahoo.com/q/hp?s=" & mysym, _
Destination:=Range("A1"))
.Name = "hp?s=" & mySym
....etc

htto????

Untested, uncompiled.
 

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

Back
Top