View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Norra Norra is offline
external usenet poster
 
Posts: 5
Default Not Enough Memory to run Microsoft Office Excel.

My original posts mentioned that I am using Office 2003 so that should tell
you what version. It appears to be overkill but if you researced the history
of appXL.Quit you will find that in VS2003 when referencing the Excel 11.0
Object Library Quit does not actually do that every time som I am forcing it
to Quit in instances where Quit does not actually kill the EXCEL.EXE process
in taskmanager.
The caption I gave it is unique, that is why I gave it a caption to make
sure that is the one that is killed.
As I said in my previous post and reiterate here, I ABSOLUTELY am sure there
are no other objects.
My application quits properly if there are no Excel memory errors, i.e., on
normal occassions. But when I get the memory error I have to force the
process to be killed before I can restart my machine or the machine won't
restart.
Excel may not be the problem but it is an obvious Excel Error that is
causing the problem so therefore I assume it is an Excel problem.

L8r G8r
Tom

"Peter T" wrote:

Your code appears to clear the objects, but if anything overkill !
Why PostMessage WM_QUIT or proc.Kill() when you have already done
appXL.Quit.
Which xl version is giving you problems, if xl2k/xl97 maybe this -

iHandle = FindWindow(Nothing, appXL.Caption)
which follows after you have done appXL.quit !

In passing, I'd change that API call -
appXL.Caption = "tempUniqueCaption" ' strong possibility of multiple apps
ruining
iHandle = FindWindow("XLMAIN", appXL.Caption)
and you could use your postMessage with the older versions with iHandle (to
replace appXL.hWnd) ) iso proc.kill

Are you absolutely sure there are no other objects anywhere in your code?
Might be worth making Excel visible before closing it.

Perhaps Excel is not the problem at all, anything else you can think of.
Does your own app quit properly.

Regards,
Peter T