Hi Team,

I have the following code that returns data from the web (via Power Query):

Code:
    Application.ScreenUpdating = False
    If CheckBox1.Value = True Then
        Sheet3.Range("B4").ListObject.QueryTable.RefreshPeriod = 1
    Else
        Sheet3.Range("B4").ListObject.QueryTable.RefreshPeriod = False
    End If
    Application.ScreenUpdating = True
It works well, but if the query fails (DataSource.Error, etc.), a pop up window will appear with the error code encountered. This then means that the 60 second refresh period stops due to the error message window requiring manual closure.

How would you guys handle this? I need either the error message to be ignored or for the error message window to close automatically after a few seconds.

Thanks,

Matty