• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How Charts are selected using the macro

vhar

New Member
Hello everyone,

I found an excellent piece of article in Chadoo's website, about how to export charts into PPT automatically.
http://chandoo.org/wp/2011/08/03/create-powerpoint-presentations-using-excel-vba/


  1. Firstly it worked fine for me.
  2. And I am using it in my projects already.
Here is the problem I am facing.
  • I created over 100 charts in a work sheet and I ran this code - workign fine
  • Nextl, I have added a chart which I forgot earlier. ( Suppose 51th chart )
  • When I ran the code again, it shows the newly added plot at the end of PPT, not in 51th place.
Any one knows how the following code selecting charts, I mean based on what attributes of the chart. I though it is name of the chart but even though I changed the chart name, it still printing at the end.

So my question is how the charts are selected when we use this code in the macro

Code:
    'Loop through each chart in the Excel worksheet and paste them into the PowerPoint
        For Each cht In ActiveSheet.ChartObjects
 
Back
Top