ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   multiple chart indexes (https://www.excelbanter.com/excel-programming/305821-multiple-chart-indexes.html)

Jack

multiple chart indexes
 
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

Jon Peltier[_8_]

multiple chart indexes
 
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/
_______

Jack wrote:

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




All times are GMT +1. The time now is 06:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com