PC Review


Reply
Thread Tools Rate Thread

Deleting multiple charts on a single sheet

 
 
Tyshaua
Guest
Posts: n/a
 
      6th Jan 2010
Hi,
Thanks in advance for the help with some code I've tried to write.
I have people entering data on a sheet. They then click a check box and
excel will take the data and put it into a chart. There are 10 lines of data
avaible to create 10 chart on a designated sheet. My code worked ok until we
were upgrated to v.2007.

It will go though and delete the charts but loop back through (I'm guessing)
and locks up at the ActiveSheet.ChartObjects.Delete

There are two problems I would like to fix.
1. Fix the code so it wont lock up if it does not find a chart to delete.
2. Only Delete charts that are wanting to be redrawn.




Sheets("XSection 1-10").Select


NumSeries = Worksheets("Survey").Range("BV50").Value
For Counter = 1 To NumSeries

ActiveSheet.ChartObjects.Delete

Next Counter
NumSeries = 0

'XSection 9
If Sheets("Survey").Range("BV9") = True Then
Charts.Add
ActiveChart.ChartArea.Select
(this goes on to create the new chart)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
consolidate data (i.e. a single cell) from multiple spreadsheets intoa single sheet James Sheriff Microsoft Excel Discussion 1 4th Aug 2010 03:56 PM
how to display multiple charts on a single chart sheet Peter Gonzalez Microsoft Excel Charting 1 21st Apr 2010 06:47 AM
Multiple charts on single chart sheet Brian Reilly, MVP Microsoft Excel Charting 3 18th Oct 2007 06:05 PM
VBA code to create multiple charts in a single Excel sheet Options i.sobha@gmail.com Microsoft Access 0 26th Apr 2007 08:22 AM
VBA code to create multiple charts in a single Excel sheet i.sobha@gmail.com Microsoft Access 0 24th Apr 2007 11:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:18 AM.