Thread
:
Deleting shape series and trendlines
View Single Post
#
5
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Deleting shape series and trendlines
It's great when you have THE charting expert around. Thanks Jon
--
Don Guillett
SalesAid Software
"Jon Peltier" wrote in message
...
If you don't know how many series, use this. Also, no need to activate
the chart.
Sub DeleteSeries()
With ActiveSheet.ChartObjects(1).Chart.SeriesCollection
Do Until .Count = 0
.Item(1).Delete
Loop
End With
End Sub
If the chart is already active, use this:
Sub DeleteSeries()
With ActiveChart.SeriesCollection
Do Until .Count = 0
.Item(1).Delete
Loop
End With
End Sub
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
Don Guillett wrote:
Here's another if you only have ONE chart and you don't know how many
series
to start with
Sub deleteseriescount()
ActiveSheet.ChartObjects(1).Activate
x = ActiveChart.SeriesCollection.Count
For i = x To 1 Step -1
ActiveChart.SeriesCollection(i).Delete
Next
End Sub
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]