Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
brg brg is offline
external usenet poster
 
Posts: 15
Default Delete chart series

I am having a problem deleting a chart series. The series contains a zero
value. The chart is a log-log plot. I am using the following code to try
and delete the series.

Activesheet.Seriescollection().Delete

I get the error:

Delete method of Series class failed.

The code works if there are no zero values in the series. Any help would be
greatly appreciated.

--
BRG
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default Delete chart series

Hi,

Sometimes it helps to change the chart type of the series to a column
chart before deleting the series.

Application.DisplayAlerts = False
With ActiveChart.SeriesCollection(1)
.ChartType = 51
.Delete
End With
Application.DisplayAlerts = True

If the chart only has 1 series you will need to set the chart type back
to original type when adding new series.

Cheers
Andy

BRG wrote:
I am having a problem deleting a chart series. The series contains a zero
value. The chart is a log-log plot. I am using the following code to try
and delete the series.

Activesheet.Seriescollection().Delete

I get the error:

Delete method of Series class failed.

The code works if there are no zero values in the series. Any help would be
greatly appreciated.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.programming
brg brg is offline
external usenet poster
 
Posts: 15
Default Delete chart series

Thanks Andy, that did the trick.
--
BRG


"Andy Pope" wrote:

Hi,

Sometimes it helps to change the chart type of the series to a column
chart before deleting the series.

Application.DisplayAlerts = False
With ActiveChart.SeriesCollection(1)
.ChartType = 51
.Delete
End With
Application.DisplayAlerts = True

If the chart only has 1 series you will need to set the chart type back
to original type when adding new series.

Cheers
Andy

BRG wrote:
I am having a problem deleting a chart series. The series contains a zero
value. The chart is a log-log plot. I am using the following code to try
and delete the series.

Activesheet.Seriescollection().Delete

I get the error:

Delete method of Series class failed.

The code works if there are no zero values in the series. Any help would be
greatly appreciated.


--

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
User Selectable Series and Number of Series for Line Chart Dave in NJ Charts and Charting in Excel 2 February 23rd 09 12:18 AM
Delete Empty Series from Chart Fermon Excel Programming 6 October 4th 07 05:18 PM
Chart series delete all then add new keri Excel Programming 2 December 21st 06 02:48 PM
Chart, Series delete event sino Charts and Charting in Excel 1 March 29th 05 01:31 AM
Chart, series delete event over context menue sino Charts and Charting in Excel 0 March 28th 05 12:49 AM


All times are GMT +1. The time now is 08:47 PM.

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"