What do you mean by not getting Marshal.FinalReleaseComObject to work?
Also the following will cause an issue with disposal
If you need to select a worksheet this way then add the following to the end of my example right before the MessageBoxCode:Dim xlSheet = xlBook.Worksheets(1)
There is never a need to use your KillProcess code unless your code crashes before completion because of a run time exception. Under normal conditions what I have provided works. Get back to me about the Marshal.FinalReleaseComObject not working.Code:GC.Collect() GC.WaitForPendingFinalizers() GC.Collect() GC.WaitForPendingFinalizers()




Reply With Quote