Dear Mr.Excel, Happy Holidays;
In my Add-In I monitor the SheetActivate event, and create an OLE control by calling active sheet's .OLEObjects.Add() method.
When the sheet de-activates its SheetDeactivate event is fired and I need to delete the control by calling its .Delete() member.
Excel is very unhappy with this approach because it is not designed to work with inactive worksheets: the SheetDeactivate event
is called when the worksheet is inactive. How do I get around this design? How do I delete an OLEObject from inactive worksheet?
Many thanks in advance.
In my Add-In I monitor the SheetActivate event, and create an OLE control by calling active sheet's .OLEObjects.Add() method.
When the sheet de-activates its SheetDeactivate event is fired and I need to delete the control by calling its .Delete() member.
Excel is very unhappy with this approach because it is not designed to work with inactive worksheets: the SheetDeactivate event
is called when the worksheet is inactive. How do I get around this design? How do I delete an OLEObject from inactive worksheet?
Many thanks in advance.