ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   listobjects and querytables (https://www.excelbanter.com/excel-programming/345517-listobjects-querytables.html)

S. Parker

listobjects and querytables
 
Is is possible in Excel 2003 to create a ListObject that has as it's
QueryTable an old-fashioned Database Query stored in a .dqy file. If I
"add" such a QueryTable to a worksheet in a VBA Module, and then "add"
a ListObject to the same range, I get an error that I can't overlap a
list with an pivot table or query.

To get around this I can delete the QueryTable first, but then every
time I want to requery the database, I have to create a new QueryTable.
I could live with this, but I can't preserve my original name for the
QueryTable. Excel insists on adding "_1", "_2" to the name I assign to
the QueryTable each time recreate it. This doesn't happen if I open
and close Excel, but that would be a bit much for users to deal with.

Any suggestions on either assigning a Database Query to a
ListObject.QueryTable, or preventing Excel's unique names for being
assigned.

Thanks, S.Parker



All times are GMT +1. The time now is 11:55 PM.

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