Sub DWQ()
Dim i As Integer
For i = QueryTables.Count To 1 Step -1
If InStr(QueryTables(i).Connection, "URL;") = 1 Then QueryTables(i).Delete
Next
End Sub
Dim i As Integer
For i = [COLOR=Red]ActiveSheet.[/COLOR]QueryTables.Count To 1 Step -1
If InStr(QueryTables(i).Connection, "URL;") = 1 Then QueryTables(i).Delete
Next
For i = 1 To ActiveSheet.QueryTables.Count
ActiveSheet.QueryTables(i).Delete
Next i