LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 152
Default xlApp.Quit - Doesn't Close Instance.... Any ideas?

Hi,
I've been having some memory problems and so I tried a little test.

According to this group and other resources, the routine below should open a
new file in a new xlApp, then upon closing, quiting, setting = nothing,
should remove it from the Task Manager.

However, it does not get rid of it. I can't see it in my windows toolbar as
an open file but it shows up in Task Manager. The other odd thing is that I
can re-run it multiple times (opening the same file) and sometimes and get
totally different Memory usage... one time it's 28MB, another it's only 15MB.

Thanks for any thoughts,
MikeZz


Sub QuickNewAppTest()
Dim MasterFile
Dim f, c, r
Dim Master As Workbook
Dim masterSht As Worksheet
Dim FileString

FileString = "S:\ATCCommon\SALES\gm\Contracts\00New\Excel\C-0C5D0-000-011.xls"
Dim xlApp As New Excel.Application 'ADDED FOR MEMORY

Application.ScreenUpdating = False
xlApp.Application.Visible = True 'ADDED FOR MEMORY

xlApp.Workbooks.Open (FileString) 'Focus is now on the workbook 'ADDED FOR
MEMORY

Set Master = xlApp.ActiveWorkbook
Set masterSht = xlApp.ActiveSheet
MasterFile = Master.Name

Master.Close SaveChanges:=False

Set masterSht = Nothing
Set Master = Nothing
xlApp.Quit
Set xlApp = Nothing 'ADDED FOR MEMORY
Application.ScreenUpdating = True

End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel instance won't quit [email protected] Excel Discussion (Misc queries) 0 September 6th 06 06:57 PM
Instance still there in task manager after xlapp.Application.Quit Mo[_8_] Excel Programming 4 October 27th 05 04:36 PM
unable to close macro using auto_close or application.quit gloria Excel Programming 1 January 14th 04 07:50 AM
Close Open Woorkbook and Quit Excel Lucy[_2_] Excel Programming 5 December 24th 03 02:52 PM
Close second instance of excel Neil[_11_] Excel Programming 2 December 22nd 03 03:39 AM


All times are GMT +1. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"