Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting chart series using VB code?

Status
Not open for further replies.

TTThio

Programmer
May 3, 2001
185
US
Hi folks,

I've posted this topic previous days ago, but no response, I wonder if it's because I posted it late.

So, here's the post again, I really hope someone could help me with this.

I'm having a chart that was build manually. With the unpredictable change of data range (depends on the rs), I finally decided to create the series dynamically (by code):

with wks("X").chartobjects(i).chart
.seriescollection.add
.seriescollection(i).value = range("X")
end with

The problem is, everytime we rerun the procedure without closing the workbook, the series are keep being added.
I need to be able to remove/delete the existing series first before rerun it and populate the chart with the new series.

I've tried to find which code can do the removal. So far, I found nothing. Did I miss something?

Please help, greatly appreciated.

Tin Tin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top