• 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.

Identifying charts in a worksheet

Marc Wingendorf

New Member
Hello guys,

I have a more generic question regarding how excel identifies charts in a worksheet.

I currently am creating a dashboard for our company reporting and have a macro in use that loops through all worksheets in my workbook and in every worksheet through every chart. Every chart gets printed in a PowerPoint I have already safed.

Everything works fine, also due to macros from here, so thank you for that!

Now my problem is that I want the macro to go through my charts in the same order. I thought if I name them Chart 1 - Chart 6 (6 charts in every worksheet) my loop will go through in the correct order, but this doesn't work.

So my question is what point of reference does a 'For Each cht In ActiveSheet.ChartObjects' loop use to identify my charts?

Can somebody help me here? If you need further information on my code please let me know!

Best regards from Munich, Germany to all of you!
______________________________________________________________
Mod edit : thread moved to appropriate forum !
 
Hi ,

The order used is by default the order of creation / insertion of the chart into the worksheet.

If you wish , you can change this order , by making of the Selection Pane , which is to be found in the dropdown once you click on Find & Select in the Home tab of the Ribbon.

You can use the arrow keys at the bottom of the Pane to reorder the charts , and the VBA code will accept this new order.

Narayan
 
Thank you very much Narayan.

Such an easy solution I was sure there is something like that!

You made my day.

Best regards from Munich,
Marc
 
Back
Top