Excel 2003 giving annoying "Send/Don't Send" error when closing

B

BigDaddyCool

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top