Hi, I am trying to loop through all nine charts on a worksheet to change the formatting. I think these charts are called "embedded", since there is other stuff on the sheet: formulas and text. The looping code I wrote operated on just the first chart. To try to find the problem I've reduced the code (without the loop) to this:
Sub formatcharts()
Worksheets("treecounts").ChartObjects(1).Chart.ChartArea.Format.Line.Visible = True
End Sub
This works for the first chart. But when I replace that (1) with (2), nothing happens to any of the nine charts.
I guess this is something very simple, but so far I can't find what the problem is. I hope someone can help; thanks!
Sub formatcharts()
Worksheets("treecounts").ChartObjects(1).Chart.ChartArea.Format.Line.Visible = True
End Sub
This works for the first chart. But when I replace that (1) with (2), nothing happens to any of the nine charts.
I guess this is something very simple, but so far I can't find what the problem is. I hope someone can help; thanks!