views:

90

answers:

1

I've written a control that runs from the Actions Pane in Excel 03. This control references a satellite .NET assembly. The control works fine but when I exit excel I get an exception. I've gone through and made sure that I'm properly disposing all of my objects. I called the dispose method on cldatapi object I created and set it to nothing. I can't figure out how to catch this error either. I tried catching unhandled exceptions from the thisworkbook class but it didn't catch it.

EventType : clr20r3 P1 : excel.exe P2 : 11.0.5612.0 P3 : 3f39ff9d P4 : okuma.cldatapi P5 : 1.7.0.3 P6 : 494bc115 P7 : 25 P8 : f2 P9 : system.exception

When I look at the details of the error report it show the exception code as 0xe0434f4d

okuma.cldatapi is the satellite reference.

A: 

That's the exception code for a managed exception. While your code is running in Excel, start Visual Studio and use Tools + Attach to Process. Select excel.exe from the list and select Managed code. Debug + Exceptions, check the Thrown box for Common Language Runtime Exceptions.

The debugger will stop when the exception is thrown.

Hans Passant
Sorry for the delayed response. I had to set it all up on another machine to test. Your instructions worked perfectly. The problem is with the 3rd party DLL. They are writing to a log in a Firebird database when the Dispose method is called and that is what is throwing the exception. I'm waiting to hear back from them.
jw7694