View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Perico[_2_] Perico[_2_] is offline
external usenet poster
 
Posts: 57
Default URGENT! Expunge Excel from Memory

Is there a fool proof way to expunge Excel from memory? I'm manipulating
Excel from Access 2003. Even when I use the following methods, I'm still
finding Excel.exe in Process in the Windows Task Manager:

Dim xlAppMst As Excel.Application
Dim xlBookMst As Excel.Workbook
Dim xlSheetMst As Excel.Worksheet

Set xlAppMst = CreateObject("Excel.Application")
Set xlBookMst = xlAppMst.Workbooks.Add
Set xlSheetMst = xlBookMst.Worksheets(1)

xlSheetMst.Visible = True
xlSheetMst.Cells.Select
Selection.NumberFormat = "@"

xlSheetMst.SaveAs fNameMst
......other code here

xlBookMst.Close
Set xlSheetMst = Nothing
Set xlBookMst = Nothing
xlAppMst.Quit
Set xlAppMst = Nothing