I’ve got to convert all those pivot tables into slides and it’s taking ages!
No worries! It’s not all doom and gloom! I did write about a similar technique recently.
This one is a little bit trickier because you’ve got to deal with multiple pivot tables per workbook rather than just one based in a particular sheet, but the code is still very similar in nature – it just needs a couple of extra loops and a mechanism to precisely determine where each table needs to go.
Giving specific names to your pivot tables will help you with this!
And below is a fully-fledged example of a code that exports multiple pivot tables by opening a pre-defined closed presentation
What if I want to export the pivot table content to a presentation that’s already open?
You need a minor tweak in the code that’s calling your PowerPoint application!
Here’s a full example of a VBA code that exports to open presentation
Don’t forget that if any of these is to run, you need to have the Microsoft PowerPoint Object Library enabled in your Excel VBE environment!
Happy VBA coding!