Hi,
I've a worksheet with several rows of two charts. I try to delete and add new ones, but therefore I need their names. So what I do is, each time I rename all these charts in the following way:
Problem:
I can have the following situation (in Chart names):
1 2
3 4
. . (none)
5 6
Then I add two charts at 'line' 3 and I change ALL the chart names into a string (not a number). And then I run the given For loop in order to achieve this:
1 2
3 4
5 6
7 8
But what I get is:
1 2
3 4
7 8
5 6
It seems as if Excel remembers where I inserted them...
Anyone have a clue on what I could try to come around this?
I've a worksheet with several rows of two charts. I try to delete and add new ones, but therefore I need their names. So what I do is, each time I rename all these charts in the following way:
Code:
For i = 1 To ActiveSheet.ChartObjects.Count
ActiveSheet.ChartObjects(i).Name = i
Next i
Problem:
I can have the following situation (in Chart names):
1 2
3 4
. . (none)
5 6
Then I add two charts at 'line' 3 and I change ALL the chart names into a string (not a number). And then I run the given For loop in order to achieve this:
1 2
3 4
5 6
7 8
But what I get is:
1 2
3 4
7 8
5 6
It seems as if Excel remembers where I inserted them...
Anyone have a clue on what I could try to come around this?