Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2008

Tip: Looking for answers? Try searching our database.

Variable in Address

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gordon - 22 Jan 2008 17:25 GMT
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
Dave Peterson - 22 Jan 2008 18:28 GMT
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.

> I am trying to use a variable in an address to call up historical
> prices for stocks out of Yahoo.
[quoted text clipped - 6 lines]
> Thanking you in advance
> Gordon

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.