LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ActiveWorkbook.Charts.Delete

Hi everyone,

I am having a problem deleting a chart that I have placed on my 'Main
worksheet. Upon using the.....

ActiveWorkbook.Charts.Delete

.....nothing happens because it doesn't detect my graph.

Here's what happens in my app.

I create the graph.....
---------------------------------------------------------------------
Sub CreatChart()

Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Main").Range
("A199:E201"), PlotBy _
:=xlRows
ActiveChart.Location Whe=xlLocationAsObject, Name:="Main"

End Sub'
---------------------------------------------------------------------


Then I move it to a better location

---------------------------------------------------------------------
Sub CoverRangeWithAChart()
'subroutine used to fill graph of the range I chose
Dim RngToCover As Range
Dim ChtOb As ChartObject
Set RngToCover = ActiveSheet.Range("C13:L29")
Set ChtOb = ActiveChart.Parent
ChtOb.Height = RngToCover.Height ' resize
ChtOb.Width = RngToCover.Width ' resize
ChtOb.Top = RngToCover.Top ' reposition
ChtOb.Left = RngToCover.Left ' reposition
ActiveChart.PlotArea.Interior.ColorIndex = 42
End Sub
--------------------------------------------------------------------

Now all that is left it to delete it however I am stuck on how to thi
can be done. Can anyone please help?

Much appreciate

--
Message posted from http://www.ExcelForum.com

 
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
Delete a sheet and access charts Jim--Kent Excel Worksheet Functions 2 April 6th 07 05:41 PM
Delete user-defined charts Lampman Charts and Charting in Excel 2 January 24th 07 01:49 AM
Delete ALL Charts in a WorkSheet (VB) Corey Charts and Charting in Excel 2 October 4th 06 08:41 AM
Macro to delete charts bambam77[_5_] Excel Programming 4 January 3rd 04 01:30 AM


All times are GMT +1. The time now is 03:00 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"