chrisger


Hi,
I added some series to a chart and .seriescollection.count results = 6. That's OK.
Now, series(6) references to empty cells. I want to delete the series but that's not possible. Err. 1004. Series with data can be deleted without problems.
How can I access the series 6.
Chris



Re: SeriesCollection(i).Delete

Andy Pope


Hi,

Empty cells certainly cause problems when dealing with charts via the object model.
A way around the problem is to change the chart type. Column charts are quite happy of empty data series to be deleted.

With ActiveSheet.ChartObjects(1).Chart

With .SeriesCollection(6)
.ChartType = xlColumnClustered
.Delete
End With

End With







Re: SeriesCollection(i).Delete

chrisger

That is cooool! Incredible!
Thanks
Chris





Re: SeriesCollection(i).Delete

tronTech

Very Cool it works