Error when closing workbooks after running .net code

G

Guest

I have written a few macros in a .NET dll which exposes functionality through
COM. I am passing the ActiveWorkbook object to the dll function which then
does a bunch of things based on the data in one of the worksheets and any
code modules in the VBProject. With some worksheets, after the macro has run
successfully and I close the workbook the project is still open in the VBIDE.
When this occurs an Excel crashes after I quit the application and generates
an error report.

The error signature is:
AppName: excel.exe AppVer: 9.0.0.8924 ModName: vbe6.dll
ModVer: 6.4.99.69 Offset: 0009a0ed

I have tried everything I can possibly think of to work around this issue
but it seems that if I so much as touch a .CodeModule property of a
VBComponent and/or attempt to remove a VBComponent from VBComponents I am
likely to get this issue. As I mentioned, this does not happen with every
workbook but it will happen every time or not at all for a given workbook. I
am running Excel 2000 SR-3 and Visual Basic.NET 2003. Some of the workbooks
may have been created with Excel 97, but I am unsure if there is any direct
correlation with that.

Calling System.Runtime.Interop.Marshal.ReleaseComObject before my function
returns seems to help with some, but not all workbooks.


Any help or insight into this problem would be greatly appreciated.
 
G

Guest

The only time i ran into this was with google desktop loaded on the pc.

known issue there and had to uninstall desktop search.
 

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