D
dule
I have a web query that is added programmatically. When it is added, th
code specifies its name. If the name already exists, excel appends
_1 (or whatever number its on)
Now, even if I delete all the query defintions and all of the rang
names with the following code,
For Each qt In ActiveSheet.QueryTables
qt.Delete
Next qt
For Each n In ActiveSheet.Names
n.Delete
Next n
And re-run the macro that adds the query, it still gives me the _1
Yet, If I close the workbook, and re-open it, and then run the macro
it creates the query without the _1 ...
So my question is, how do I clear all reminents of a query tabl
without having to reload the workbook (i.e. What am I missing othe
than clearing the range name and the query table?)
code specifies its name. If the name already exists, excel appends
_1 (or whatever number its on)
Now, even if I delete all the query defintions and all of the rang
names with the following code,
For Each qt In ActiveSheet.QueryTables
qt.Delete
Next qt
For Each n In ActiveSheet.Names
n.Delete
Next n
And re-run the macro that adds the query, it still gives me the _1
Yet, If I close the workbook, and re-open it, and then run the macro
it creates the query without the _1 ...
So my question is, how do I clear all reminents of a query tabl
without having to reload the workbook (i.e. What am I missing othe
than clearing the range name and the query table?)