What do you mean by "ignoring errors". If you truly ignored them, there would be no need for this query?
I am guessing that you are after something other than "On Error Resume Next".
You can use following function that you can run in Debug mode. In first run, pass deleteVal as false and press Ctrl-G during Debug mode to see names of tables.
Sub DeleteAllWebConnectors(filter As String, deleteVal As Boolean) 'DeleteAllConnectionsQueryTablesAndNames
Dim i As Integer
Dim QT As QueryTable
Dim Cnxn As Variant
'Dim CnxnName As Name
For Each QT In ActiveSheet.QueryTables
Debug.Print "Query Table named", QT.Name ', QT.WorkbookConnection.Name
If ((Len(filter) = 0) Or (Len(filter) <> 0) And (InStr(1, QT.Name, filter) > 0)) Then
Set Cnxn = QT.WorkbookConnection
If Not Cnxn Is Nothing Then
'On Error Resume Next
If Cnxn.Ranges.Count > 0 Then
Debug.Print "Linked Connection ", Cnxn.Name, Cnxn.Ranges(1).Address
Else
Debug.Print "Linked Connection with no Linked Cell Address", Cnxn.Name
End If
If deleteVal Then Cnxn.delete
End If
If deleteVal Then
QT.delete
End If
End If
Next
For Each Cnxn In ActiveWorkbook.Connections
Debug.Print "Connection Named ", Cnxn.Name ', Cnxn.Ranges(1).Address
If ((Len(filter) = 0) Or (Len(filter) <> 0) And (InStr(1, Cnxn.Name, filter) > 0)) Then
If deleteVal Then Cnxn.delete
End If
Next
End Sub
Bookmarks