Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All:
I am creating a chart by ht following code, that is activated via command button. Private Sub CommandButton3_Click() Application.ScreenUpdating = False Charts.Add ActiveChart.Location Whe=xlLocationAsObject, Name:="Roster" With ActiveChart .SetSourceData Source:=Sheets("Roster").Range("A2:E5"), PlotBy:= _ xlRows .HasTitle = True .ChartType = xlColumnClustered .HasLegend = False .SeriesCollection(1).XValues = "=Roster!R2C1:R5C1" .SeriesCollection(1).Values = "=Roster!R2C4:R5C4" .SeriesCollection(1).Name = "=Roster!R1C4" .SeriesCollection(2).Values = "=Roster!R2C5:R5C5" .SeriesCollection(2).Name = "=Roster!R1C5" .ChartTitle.Characters.Text = "Concepts About Print" .Axes(xlCategory, xlPrimary).HasTitle = False .Axes(xlValue, xlPrimary).HasTitle = False End With I want to delete this chart via another command Button using this code, it is not working, Any Idea Private Sub CommandButton4_Click() ActiveSheet.ChartObject.Delete End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting All charts using VB | Excel Programming | |||
Deleting SeriesCollections in charts | Excel Programming | |||
Charts should not be resized when deleting rows/columns. | Charts and Charting in Excel | |||
Automatically Confirm Deleting Charts | Excel Programming | |||
Deleting charts on a sheet | Excel Programming |