|
-
May 14th, 2000, 09:49 PM
#1
Thread Starter
Hyperactive Member
My app launches an Excel which I can't get rid of!
I'm using
Code:
oXL.DisplayAlerts = False
oXL.ActiveWorkbook.Save
oXL.Application.Quit
Set oXL = Nothing
where oXl is the Excel.Application object. I've tried it
both invisible and visible and the EXCEL.EXE will not
disappear from the Task manager (no errors generated).
I'm assuming this is because I still have an 'un-Nothing-ed'
object reference somewhere...is it?
And what can I do about it?
Please help!!!!!

Dan
-
May 14th, 2000, 10:10 PM
#2
Addicted Member
Hi,
You could try this :
1) Find a handle to the app (by it's caption and the FindWindow API)
2) Send this window a WM_CLOSE ( &H10 ) with the sendmessage API.
Worked for me so I hope it will work for you too...
Bye
-
May 14th, 2000, 10:17 PM
#3
Thread Starter
Hyperactive Member
That night work, but...
a) the window actually closes (in visible mode), its the excel.exe I can't get rid of.
b) I'd prefer not to be so heavy handed...I don't want to be leaking resources all over the shop.
Thanks for the suggestion though,

Dan
-
May 14th, 2000, 11:59 PM
#4
Addicted Member
add an
oxl.quit
in there and it should die gracefully.
-
May 15th, 2000, 08:17 AM
#5
Lively Member
see getobject
example in VB help
and also at runtime add watch on ur
xlsobject.application
u will get all the properties
-
May 15th, 2000, 02:08 PM
#6
Thread Starter
Hyperactive Member
-
May 15th, 2000, 10:52 PM
#7
Addicted Member
It should be:
oXL.DisplayAlerts = False
oXL.ActiveWorkbook.Save
oXL.Workbooks.Close
oXL.Application.Quit
oXL.Quit
Set oXL = Nothing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|