Thread: Delete a chart
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Shell Shell is offline
external usenet poster
 
Posts: 32
Default Delete a chart

Yes I have. it crashes. I need to rerun it to get the err msg.
Note: the chart is embedded on the same sheet as the data.
--
Shell


"Don Guillett" wrote:

Have you tried recording a macro?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Shell" wrote in message
...
I have created a chart in code as follows:

Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData Source:=Sheets("Analysis").Range("B1:C3"),
PlotBy:= _
xlColumns
ActiveChart.Location Whe=xlLocationAsObject, Name:="Analysis"
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With

How do I delete the chart in code?

Thanks

--
Shell