How to reassign ODBC driver in using VBA macro

P

Paul Lambson

I have a worksheet that has 25 pivot tables and I have to recreate
this report every few months with a new data set. I would like to be
able to reassign the ODBC driver with a macro but when i record the
macro it stops recording when i enter the microsoft query editor. Does
anyone have a macro that would let me reassign all these pivot tables
at once rather than replacing them manually?

Right now I chance the the table the pivot table is reading from
withing the same driver. If it helps I could the table name the same
create a new driver.

Thanks in advance,

Paul Lambson
 
J

Joel

Record the macro and then replace the Command Text data with the SQL from the
query editor by cutting the data from the query editor and pasting it into
your macro. You may have to make some minor edits after pasting the string.
 

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