doerte

doerte

  • NA
  • 2
  • 0

Exit Excel ???

Dec 4 2003 3:59 AM
Heya, I would like to load a xls-File in .NET, to change it and than to save it again. All this is no problem. But with each Excel.Application() i create a new process. There is no way to exit these process after saving. I tried everything like this: theWorkbook.SaveAs(FilePth & FileNm) excApp.DisplayAlerts = False excApp.ScreenUpdating = True theWorkbook.Close(SaveChanges:=False) excApp.Quit() excApp.Workbooks.Close() excApp.Application.Quit() oSheet = Nothing theWorkbook = Nothing oWorkbooks = Nothing excApp = Nothing GC.Collect() And if I try to access to the process with something like this: Dim pr As Process() pr = Process.GetProcessesByName("EXCEL") I always get the errormassage: Access is denied. I get the same massage if I try to close this process by the Taskmanager. :-( Have I forgot something? Is this a bug? Please, is there somebody who could help me? Thanks, Doerte