From: BigDaddyCool on
I am accessing an instance of Excel 2003 through a Codegear C++ program I'm
writing. The code looks something like this (not that it really matters all
that much):

TExcelApplication* ea = new TExcelApplication(this);
ea->Connect();
ExcelWorkbookPtr ewbPtr = ea->get_ActiveWorkbook();

// do stuff...

ewbPtr.Release();
delete ea; ea = 0;

I can connect to Excel and write to it just fine. However, when I try to
disconnect from it and close/delete the Excel application instance, I get an
annoying Excel error message that says, "Excel has encountered a problem and
needs to close. We are sorry for the inconvenience." This isn't a problem; of
course Excel needs to close! I'm the one that closed it!!

What causes this superfluous error message to be displayed, and how do I
disable it?