I have a program that opens an Excel 2000 spreadsheet, reads several columns, then queries an oracle database using the values in each row of the columns to retrieve additional information, which I then write to a new worksheet in the workbook. This all works fine except that I allow the user to select the worksheet and columns interactively in Excel and the user sometimes closes the workbook while Excel, which crashes my program. I'd like to use the OnBeforeClose event to block the closure, or at least verify that they want to really do this and then handle the disconnect gracefully. Unfortunately, when I try using even the simplest event handler, i.e., "int I; I = 1;" in the event method body, the program crashes with a cpu dump when Excel is closed.
I'm running BCBv6 sp2 and I'm using the TExcelApplication component to access Excel 2000.
Anyone know how to do this or something like this another way?
Ron Brown
I'm running BCBv6 sp2 and I'm using the TExcelApplication component to access Excel 2000.
Anyone know how to do this or something like this another way?
Ron Brown