Hi,
Wondering if anyone has figured out how delete specific queries in a workbook?
The below deletes all, but I want to remove a specific one as well before
PS: See Post $4. stCode:Public Sub RemoveQueries()
'Removes all PowerQueries from Workbook
Dim cn As WorkbookConnection
Dim qr As WorkbookQuery
On Error Resume Next
For Each cn In ThisWorkbook.Connections
cn.Delete
Next
For Each qr In ThisWorkbook.Queries
qr.Delete
Next
End Sub