Hi,
i am using code to delete all power queries:
but it doesnt work.Sub removeAllQueries() Dim cn Dim qt As QueryTable Dim ws As Worksheet For Each cn In ThisWorkbook.Connections cn.Delete Next For Each ws In ThisWorkbook.Worksheets For Each qt In ws.QueryTables qt.Delete Next Next ws MsgBox "Done!" End Sub
In attachement workbook with Table1 connection which is still there after runnning code,
please help,
Jacek
Bookmarks