I am pretty new to VBA and am learning how to add connections to databases in excel. I currently have a macro that creates a query called \"Query1\" it then queries my datab
Try adding the following line. The Activeworkbook.Queries() takes a Name or Index
ActiveWorkbook.Queries("Query1").Delete