View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Excel MVP Don Guillett Excel MVP is offline
external usenet poster
 
Posts: 168
Default Why do I have to restart Excel when ActiveSheet.QueryTables.Addfails? Options

On Dec 18, 5:26*pm, Frank wrote:
Hi Don:

Thanks for your message.

It looks like you used IBM as the ticker instead of blablabla. While I
have built workarounds to insure the ticker symbol is valid,
occasionally, a valid symbol will still fail. In this case, I have to
restart Excel to make a new query. Resume next does not solve the
problem.

I’ve uploaded the error message I get. I first used blablabla and then
IBM. The gif file is the IBM error.

http://www.gingins.info/error1.gif

To answer your question about why I do not use adjusted price, I’ve
uploaded another gif file which explain my logic:http://www.gingins.info/ibm.gif

Regards,


I use a different method with an an on error that doesn't have that
problem
strurl = "http://table.finance.yahoo.com/table.csv?s=" & symbol

As to the adjusted price, you may find these useful
Yahoo uses proportionate adjustments meaning they calculate the
dividend as a percentage and removes the percentage for adjusting data
prior to ex-dividend. Yahoo's method is the industry standard.
http://luminouslogic.com/how-to-norm...idends-etc.htm
If I use the "actual" close, then I *will* need to adjust the number
of owned shares for splits as they happened.
http://help.yahoo.com/l/us/yahoo/fin.../quote-12.html