ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   DISABLE "SAVE QUERY DEFINITION" (https://www.excelbanter.com/excel-programming/320278-disable-save-query-definition.html)

[email protected]

DISABLE "SAVE QUERY DEFINITION"
 
Is it possible to disable "save query definition" through macro.
Basically I do not want any external data links saved in define names
when I run query through macro.

Thanks


Rob van Gelder[_4_]

DISABLE "SAVE QUERY DEFINITION"
 
This deletes all querytables from ActiveSheet

Dim qtb As QueryTable

For Each qtb In ActiveSheet.QueryTables
qtb.Delete
Next

This approach will leave behind the named range for the querytable.

If you're managing QueryTables you may be interested in the Query Editor
Add-In on my website.


--
Rob van Gelder - http://www.vangelder.co.nz/excel


wrote in message
oups.com...
Is it possible to disable "save query definition" through macro.
Basically I do not want any external data links saved in define names
when I run query through macro.

Thanks





All times are GMT +1. The time now is 08:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com