Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel chart source data

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
add source data to chart in excel Susan Charts and Charting in Excel 3 April 24th 08 10:22 PM
Excel changes chart source data. Drops the Filename reference from ybkusz Excel Discussion (Misc queries) 0 February 1st 08 03:14 AM
Excel chart source data y-values can only accept 7 data pts? progprog Charts and Charting in Excel 3 March 14th 07 01:09 AM
excel chart with data source from an access query rahmad Charts and Charting in Excel 7 January 31st 07 03:55 AM
Excel 2007 - How do I quickly update a chart using Source data? SWODoug Charts and Charting in Excel 2 June 12th 06 09:31 PM


All times are GMT +1. The time now is 03:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"