+ Reply to Thread
Results 1 to 3 of 3

Error in Macro: (Refresh BackgroundQuery:=False)

  1. #1
    Registered User
    Join Date
    10-26-2008
    Location
    Edmonton
    Posts
    2

    Error in Macro: (Refresh BackgroundQuery:=False)

    Hi there,
    There is a problem in my Macro code. I really appreciate if you could advise me in this regard. I am trying to collect some information from MSN Money for some companies listed in stock market. I have some symbols (companies' name in Sheet1) and this macro takes these symbols one by one and through Web Query it imports one table of information for each symbol. When I run this code for the first time on a computer, it works. But when I try to run it more times, I will get "run time error 1004" for this line:

    Refresh BackgroundQuery:=False

    Could you help me. Thanks in advance
    This is my code: (file is attached)

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by VBA Noob; 10-26-2008 at 11:59 AM. Reason: Mod added code tags as per forum rules. Do not change again

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello abehnamian,

    Welocme to the Forum!

    Not sure if this changed in 2007, but in the previous versions Refresh was used only with SQL connection queries. Yours is not. Delete that line, and run the query again.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    10-26-2008
    Location
    Edmonton
    Posts
    2

    Thanks Lieth

    I deleted this line (Refresh BackgroundQuery:=False) and ran the code again, but it did not worked. After deleting the line, no information is downloaded from the internet via web query. Thanks for your replay again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1