Hi,
Please check whether the following code is helpful.
Please add the following code in Your existing code.
Workbooks("Book3").Activate
Worksheets("Sheet1").Activate
Range("SalesReport[#All]").Select
Application.CommandBars("Queries and Connections").Visible = Not Application.CommandBars("Queries and Connections").Visible
Selection.ListObject.QueryTable.Delete
Selection.ClearContents
Modification 1: in the above code, please replace Book3 with the workbook name in which the merged query resides.
Modification 2: in the above code, please replace Sheet1 with the name of the worksheet in which the merged query resides.
Modification 3: in the above code, please replace SalesReport with the name of the merged query.
Hope, this helped.
Please respond if You require further assistance. I will try My Best to be of help.
If I was able to help You, please mark My response as answer and helpful.
Thank You!