SeriesCollection(i).Delete

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


Answer this question

SeriesCollection(i).Delete

  • Biju S Melayil

    That is cooool! Incredible!
    Thanks
    Chris

  • pnp

    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



  • cmwith

    Very Cool it works

  • SeriesCollection(i).Delete