Posts by mjsimmons

    Re: EXCEL VBA - Problem with Refresh BackgroundQuery:=False


    Hi Junho Lee

    I very much appreciate your response.

    By amending your code and leaving out lines 3 and 4 it worked, thus:


    Thank you for your help.


    Regards


    Mike Simmons

    Hi
    Downloading stock prices from Yahoo Finance, against a list of stock codes that are valid works fine e.g.

    AA, AXP, BA, C, CAT, D etc.

    The Query Quote coding used being as follows:


    The problem I encounter is if the list of stock codes, include an invalid code (in this example I have used 'VVV', or a stock code that is valid, but is not in the Yahoo database for the specific date that I am downloading, the following a error message is displayed:

    Run Time Error 1004 Unable To open
    http://chart.yahoo.com/table.c…&a=1&b=3&c=2011&d=1&e=The Internet site reports that the item you requested could not be found (HTTP/1.0 404)

    The system stops, and I cannot move forward.

    On debugging - .Refresh BackgroundQuery:=False is highlighted.

    I would like to be able to add code that would skip any invalid entries such as the above, and which would then access the next valid stock code and download the stock price against this.
    Any soultion that anyone could provide would be most appreciated.

    Regards

    Mike Simmons