View Single Post
  #7   Report Post  
Andy Pope
 
Posts: n/a
Default

Hi,

Confused.
If the chart is being deleted by code then surely you know the chart is
being deleted, no?

If you actually just need to be able to execute the code thats in the
Deactivate event then move the code it into its own public routine
within the class. You can then use this new method.

Cheers
Andy

wrote:
Andy,
On other observation after testing your suggestion. It works fine if
you delete the chart from the UI. But if you have code that does a
programmatic delete (i.e. ChartObject.Delete) this event does not seem
to fire. I have an instance were I need to delete a chart
programmatically since the data that the chart represents is also being
deleted. When the data is deleted, as a good cleanup we also delete
the chart, but I would need this delete to also fire the Deactivate
event. Let me know if I am missing something here. Thanks again for
the help.

Roy


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info