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
Bookmarks