![]() |
Error when closing workbooks after running .net code
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. |
Error when closing workbooks after running .net code
The only time i ran into this was with google desktop loaded on the pc.
known issue there and had to uninstall desktop search. "Stefan Hojnowski" wrote: 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. |
All times are GMT +1. The time now is 04:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com