Results 1 to 1 of 1

RefreshQuery prob

Threaded View

Slyone2 RefreshQuery prob 07-29-2010, 10:56 AM
  1. #1
    Registered User
    Join Date
    07-15-2010
    Location
    usa
    MS-Off Ver
    Excel 2003
    Posts
    51

    RefreshQuery prob

    Using this code in excel2003 : I get errors.
    It updates correctly from the internet.. but, when connection is slow or broken. it times out and gives me error display. I want to remove error display dialog box. I have "On Error Resume Next" but it still gives error msg box and halts everything. When excel in minized it a problem.

    What I would like to do is:

    Have refresh run, if error- ignore dont show dialog box-- skip refresh, run refresh.


    Sub RefreshQuery()
    On Error Resume Next 'needed for errors stopping downloads
    Application.ScreenUpdating = False
    Application.DisplayAlerts = False
    Application.EnableEvents = False
        
            Windows("P.xls").Activate
            Sheets("1").Select
                Range("D9").Select
                Selection.QueryTable.Refresh BackgroundQuery:=True       
    
    Application.ScreenUpdating = True
    End Sub
    Last edited by Slyone2; 07-29-2010 at 12:51 PM.

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