Thread: delete chart
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Wayne Wayne is offline
external usenet poster
 
Posts: 133
Default delete chart

Thanks for that piece of code I got it to work thanks.I deleted my code and
used the 1 line you gave me.

Thanks
Wayne

"Don Guillett" wrote:

Perhaps your chart was NOT chart 1? Try this
ActiveSheet.ChartObjects(1).Delete



for all, try
for each ch in activesheet.chartobjects
ch.delete
next ch
--
Don Guillett
SalesAid Software

"Wayne" wrote in message
...
I get a message that says unable to get the ChartObjects property of the
worksheet class.

"Don Guillett" wrote:

try

ActiveSheet.ChartObjects("Chart 1").Delete

--
Don Guillett
SalesAid Software

"Wayne" wrote in message
...
I am trying to find a way to delete a chart with VBA.I am able to create
a
chart but not delete one.Thanks for your help
Wayne