listobjects and querytables

S

S. Parker

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top