Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Location: Belgium
Posts: 3
Default Removing a serie in a chart (VBA)

Hello,

I'm trying to make a vba script that replaces the series in a graph by other series. The problem is that I cannot find a method to remove a serie from a seriescollection (I find a method to add a new one, but not to remove an old one). The add method had an argument that allows the replacement of serie by the new one, but the number of series varies, so I cannot use it.

I also saw that the object series responds to the 'Delete' method, but I did not find how to use it.

Thanks in advance,

Renaud

Last edited by Renaud : May 31st 05 at 02:51 PM
  #2   Report Post  
Junior Member
 
Location: Belgium
Posts: 3
Default

I'm answering to myself. I finally found. Here is the solution:

Code:
While Charts("Chart1").SeriesCollection.Count  0
    Charts("Chart1").SeriesCollection.Item(1).Delete
Wend
But if you've better ideas, i'm taker.

Renaud
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
Removing "0"s from a chart obrady Charts and Charting in Excel 2 May 11th 05 05:02 PM
Urgent Chart Assistance Brent E Charts and Charting in Excel 1 May 10th 05 09:09 AM
Urgent Chart Questions Brent E Excel Discussion (Misc queries) 0 May 9th 05 11:01 PM
Urgent Chart Assistance Requested Brent E Excel Discussion (Misc queries) 0 May 9th 05 11:01 PM
Removing specific data from a bar chart Tony Charts and Charting in Excel 2 March 4th 05 03:44 PM


All times are GMT +1. The time now is 11:41 PM.

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

About Us

"It's about Microsoft Excel"