how to protect against Excel crashing

eric2
06-28-2001, 07:52 AM
My Excel VBA app crashes when it encounters corrupt input data, I would like to capture the error.

The input workbook gets saved in a corrupted state. After that, on a call to the workbook's ChangeLink method, Excel crashes (message: 'The instruction at xxx referenced memory at yyy. The memory could not be "read". Click on OK to terminate the application.')

The corruption relates to a cell which makes an invalid call to a function defined in a C binary XLL. Obviously the ideal is to prevent the workbook getting corrupted in the first place, and I'm working on that, but if it does get corrupted I would like to capture the error rather than having Excel crash. How can I do this?

I have tried preceding the call to ChangeLink with "On Error GoTo", this has no effect.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum