Re: Yahoo quotes error in Excel

From: Peter Benson (junk_at_junk.com)
Date: 02/11/04


Date: Thu, 12 Feb 2004 10:48:28 +1100

Keith,

You really must stop your style of post: which is to, firstly, invalidate
the original poster's problem (" I can get it to work therefore there is no
problem"), and, secondly, rather than offering a snippet of code or some
other useful suggestion simply referring people to your web site to download
your own products. Your own products are password protected and therefore of
no use to people in this forum which is an Excel programming forum.

But also, importantly, your products contain bugs and should not be
referred to anybody in their present state (more of that below).

Regarding my problem: it is a real problem with the Yahoo site. I have an
add-in used by tens of thousands of people world-wide and as from a couple
of days ago, this part of it no longer works on MOST (not all) versions of
Excel/Windows/IE. The code is standard code used by everybody who does web
queries to Yahoo:

The code, in its most stripped down version is:

URL =
"URL;http://finance.yahoo.com/d/quotes.csv?s=IBM&f=sl1d1t1c1ohgv&e=.csv"

With WB.Worksheets("Docs").QueryTables.Add(Connection:=URL,
Destination:=WB.Worksheets("Docs").Range("a1").Cells(1, 1))

    .Refresh BackgroundQuery:=False

End With

No other properties need be set. The above code has been working for years.
It still works on Excel 97 under Windows 95 with IE 5.1 installed. It doesn'
t work )ie produces the Application-defined or
object-defined error on Excel 2000 under Windows 2000, Excel 2000 under
Windows 98 or Excel 2003 under Windows XP (all running IE 6.0 with latest
patches). Perhaps there are other situations where it WILL work. But there
certainly is a problem with the Yahoo link which wasn't there before. And it
can be tested manually (but like under Excel, on some versions of Windows/IE
it still works OK). Dozens of emails from my users from around the world
have confirmed the problem. It isn't solved, Keith, by your gratuitous
comments "it works for me" with no other information.

Now Keith: if you acknowledge the problem you may have a solution. If so
how about you post it here -- point out the error in my code which I'm
happy to admit is a real possibility. But don't just refer us to your web
site to promote your software.

Now to YOUR software and it's problems: I downloaded your software. Firstly
it doesn't do quotes so I'm not even sure why you referred me to it. It does
historical data, which is a completely different Yahoo service which still
works fine.

But anyway I thought I'd try it. Keith: try getting historical data for
start date 1 Aug 1999 to the present for the following stocks: N.TO, ANZ.AX,
BSY.L. Does it return all the data for these stocks? No - it only returns
the last 200 trading days. Where is the rest of the data Keith? Perhaps you
should test it for non-US exchanges - there are quite a few of them you
know. And don't tell me Yahoo only provides 200 days of data maximum for
non-US exchanges. It's not true - I use it myself all the time to extract
four and more years' of data. I won't post a code snippet here keith
because it's not an Excel issue: it's a basic programming logic issue.

So, please offer relevant suggestions by all means but stop just referring
people to your buggy password protected software which is of no use to this
forum.

"KJTFS >" <<KJTFS.11fiey@excelforum-nospam.com> wrote in message
news:KJTFS.11fiey@excelforum-nospam.com...
> I tried your method and it worked on my computer I have attached the
> csv file (in a zip that it saved for me) I am using XP pro with IE
> 6.0
>
> Keith
> www.kjtfs.com
>
> Attachment filename: quotes.zip
> Download attachment:
http://www.excelforum.com/attachment.php?postid=438022
> ---
> Message posted from http://www.ExcelForum.com/
>