View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default Excel chart source data

Hi John,

The following will remove each data series from the active chart.
Sub x()
' remove data from chart
With ActiveChart
Do While .SeriesCollection.Count 0
.SeriesCollection(1).Delete
Loop
End With
End Sub

Cheers
Andy


John wrote:
Is there a way with code to clear the source data from an chart in Excel? I
don't want to delete the chart just clear the source data when the workbook
is closed.
Thanks



--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info