VBA for Copying Charts from Excel to Powerpoint

DMurray3

New Member
Joined
Dec 23, 2010
Messages
26
Hi All,

I am using Excel 2007 (xlsx) & PowerPoint 2007 (ppt).

I have used J.Peltier's recommended macro to copy multiple charts as "pictures" to ppt. However, thanking Jon for his explanation why to copy as a "picture", I need to copy my charts as Chart Objects as well use the chart titles as "slide titles" and of course the alignment of the chart in the corresponding slide.

I would highly appreciate if someone could guide me to change the "CopyPicture.." to copy the chart as an "object"?

I have tried doing the modification myself, using but in all attempts, I have failed miserably.

Any help will be highly appreciated.

Kind regards, DMurray3
 
Why do you have to copy them each month?

Simply Copying the Charts Manually into Power Point creates a link to Excel, so when you update your excel sheet the Charts update in the Power Point automatically.

In Power Point go into the Options and you will see Edit Links, you can turn them on to update automatically.

When Power point is opened, it automatically maps to the excel sheet and updates the charts. I do it all the time and works pretty good. Sometimes the mapping just stops working for what ever reason, but as long as the files are saved to a defined location it works as a mapped document.

You can also copy tables that will auto update.
 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Bump on this thread: How can I modify this code to continue doing the copy chart to PowerPoint for the remaining tabs? I tried incrementing iCht via "iCht = iCht +1" before the "Next"...but that doesn't work.

Detailed explanations are helpful - I'm a novice.

Thank you!!
 
Upvote 0
The code loops through all chart objects on the active sheet:

Code:
For iCht = 1 To ActiveSheet.ChartObjects.Count
  ' blah blah
Next

You'll need to nest this within a loop that checks every sheet:

Code:
Dim wksht As Worksheet
For Each wksht In ActiveWorkbook.Worksheets
    For iCht = 1 To wksht.ChartObjects.Count
        ' same as previous blah blah
        ' except change ActiveWorksheet to wksht
    Next
Next
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,855
Members
452,948
Latest member
UsmanAli786

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