multiple chart indexes

  • Thread starter Thread starter Jack
  • Start date Start date
J

Jack

Hello,

I am having an issue with some sheets that contain
charts. I am programatically looping through charts on
each sheet with a for each loop when I noticed that some
sheets that only have 11 charts contain multiple chart
indexes. For example, sheet2 has 11 charts, but when I
loop through the chart objects on that sheet, it counts 22
indexes. This problem multiplies for each sheet in turn
(sheet 3, 33 indexes, sheet 4, 44 indexes, etc). I cannot
find these other charts anywhere on the sheets. I only see
11 charts. I tried moving them to see if there were hidden
charts stacked, but nothing. I looped through setting each
chart's visible property to true, still nothing. How do I
rid my worksheets of these multiple chart indexes when
they don't exist? There should only be 11 charts on each
sheet, not the multiples of 11 that appear to be there.

Thanks for any help/advice,

-Jack
 
Jack -

On sheet 2 are there 22 charts, or 11 charts, numbered from 12 to 22?
Type (or copy-paste) this in the Immediate window with sheet 2 active in
Excel, and press Enter:

? Activesheet.ChartObjects.Count

If you think there are other charts, try this:

Activesheet.ChartObjects.Visible = True

Activesheet.ChartObjects.Select

etc.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top