Automatically put dynamic chart in specific PPT slide based on criteria of slicer (VBA)

Djani

Board Regular
Joined
Aug 26, 2015
Messages
61
Dear all,

I have a report with one dynamic chart (=one object for VBA) in a sheet called "VIVA GRAPH". In the picture down below you will see on the left hand side two cells that are referring to the pivot table where the slicers are linked to. There are in total 2 (countries) x 9 (models) = 18 possible combinations.

2lxv041.png


There is a PowerPoint that has to be updated on a monthly basis. The structure of the PowerPoint won't change, so e.g. the graph regarding Portugal & Note will be put in slide 8.

Is it possible to create a VBA macro that automatically copy-pastes this one chart into a specific slide? When someone clicks on another criteria it will be put into another slide. This to prevent copy-pasting a lot.

Looking forward to hearing from you.

Yours sincerely,

Djani Sadloe
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Thanks for the tip, but that's exactly the issue. The dynamic chart have to be put in multiple slides. I can solve this by manually clicking on a criteria, copy-paste the chart, and do this dozens of times. However, if that's possible, I want this sequence to be automated since many people will make use of this report. If I link this chart via "Paste Link" to a PowerPoint then the chart will be changed whenever someone else changes the criteria of the slicer.

Since the layout/structure of the PowerPoint will always stay the same I was thinking of making the VBA script refer to the 2 criteria which you see in the picture above. E.g. the combination "Portugal" and "Note" will always be put in slide 8, the combination "Spain" and "Note" will be put in slide 9 etc. etc.

Do you have any suggestions regarding VBA?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,822
Members
449,469
Latest member
Kingwi11y

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top