C
cate
At the beginning of the code I blow away any chart objects I find with
Dim co As ChartObject
For Each co In mySheet.ChartObjects
co.Delete
Next
And for good measure (this is probably all you have to do)
mySheet.ChartObjects.Delete
Afterwards, Chart.ChartObjects.Count is == 0
Later, I review the charts on the sheet with
For Each co In ws.ChartObjects
sTitle = co.Chart.Name
MsgBox ("has the name " & sTitle)
Next
Only one chart is found, but it's name is incrementing. This leads me
to believe that I really didn't blow away everything and that I can't
be sure I'm starting with a clean slate.
If I delete the sheet and recreate it, the chart names reset.
Why does this name persist?
Dim co As ChartObject
For Each co In mySheet.ChartObjects
co.Delete
Next
And for good measure (this is probably all you have to do)
mySheet.ChartObjects.Delete
Afterwards, Chart.ChartObjects.Count is == 0
Later, I review the charts on the sheet with
For Each co In ws.ChartObjects
sTitle = co.Chart.Name
MsgBox ("has the name " & sTitle)
Next
Only one chart is found, but it's name is incrementing. This leads me
to believe that I really didn't blow away everything and that I can't
be sure I'm starting with a clean slate.
If I delete the sheet and recreate it, the chart names reset.
Why does this name persist?