Delete a query from excel workbook with Vba

后端 未结 1 467
灰色年华
灰色年华 2020-12-07 02:47

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

相关标签:
1条回答
  • 2020-12-07 03:42

    Try adding the following line.
    The Activeworkbook.Queries() takes a Name or Index

    ActiveWorkbook.Queries("Query1").Delete
    
    0 讨论(0)
提交回复
热议问题