How to reassign ODBC driver in using VBA macro

  • Thread starter Thread starter Paul Lambson
  • Start date Start date
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
 
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.
 
Back
Top