Gino_Vernisci
New Member
- Joined
- Jul 13, 2011
- Messages
- 20
Hey Guys
I have a report that I put together monthly. The report contains 38 different pivot tables all of which reference a single separate excel workbook.
I would like to write a VBA macro that changes the data source for all 38 Pivot Tables to a new excel workbook and updates each pivot table. I do not need to reformat any of the pivot tables. Simply changing the data source and updating the pivot tables is sufficient.
Ideally the code could update all of the Pivot Tables in the report at once without instructing the computer to go to each individual sheet and carry out the procedure however I am not sure this is possible.
I have found the function "expression.changeconnection(conn)" which may be the place to start. I would appreciate any help you could give.
If you need any further information please say so and I will respond promptly.
Cheers
Gino
Windows 7 Excel 2010
I have a report that I put together monthly. The report contains 38 different pivot tables all of which reference a single separate excel workbook.
I would like to write a VBA macro that changes the data source for all 38 Pivot Tables to a new excel workbook and updates each pivot table. I do not need to reformat any of the pivot tables. Simply changing the data source and updating the pivot tables is sufficient.
Ideally the code could update all of the Pivot Tables in the report at once without instructing the computer to go to each individual sheet and carry out the procedure however I am not sure this is possible.
I have found the function "expression.changeconnection(conn)" which may be the place to start. I would appreciate any help you could give.
If you need any further information please say so and I will respond promptly.
Cheers
Gino
Windows 7 Excel 2010