View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default ChartObjects Insanity - Excel 2007

typo (cnt - 1) !

should of course be

ws.chartobjects(cnt + 1).delete

Peter T


"Peter T" <peter_t@discussions wrote in message

It could be done with slightly less of a kludge if you use an existing
worksheet rather than adding a temporary one. If you do, start with

cnt = ws.chartobjects.count
' loop and move the chartobject
ws.chartobjects(cnt - 1).delete