cfwti
asked on
Late binding EXCEL Proceess stays active - VB6
Problem - for a late binding EXCEL app (VB6), the process remains in the task mgr.
(Windows XP, EXCEL 2000, VB6)
First - here is a sequence that works fine.
set xlsapp = CreateObject("EXCEL.APPLIC ATION")
xlsapp.quit
Set xlsapp = nothing
With this sequence, the EXCEL process is ended, as indicated by viewing the Windows Task Mgr.
Second - here is a sequence that does not work - the EXCEL process remains active as indicated by viewing the Task Mgr
set xlsapp = CreateObject("EXCEL.APPLIC ATION")
rows("10").Select 'this type of statement results in the EXCEL process remaining active in the TaskMgr
xlsapp.quit
Set xlsapp = nothing
Do I need to do something with the "rows" or "Selection" properties before quiiting xlsapp?
Any help is greatly appreciated. Thank you
(Windows XP, EXCEL 2000, VB6)
First - here is a sequence that works fine.
set xlsapp = CreateObject("EXCEL.APPLIC
xlsapp.quit
Set xlsapp = nothing
With this sequence, the EXCEL process is ended, as indicated by viewing the Windows Task Mgr.
Second - here is a sequence that does not work - the EXCEL process remains active as indicated by viewing the Task Mgr
set xlsapp = CreateObject("EXCEL.APPLIC
rows("10").Select 'this type of statement results in the EXCEL process remaining active in the TaskMgr
xlsapp.quit
Set xlsapp = nothing
Do I need to do something with the "rows" or "Selection" properties before quiiting xlsapp?
Any help is greatly appreciated. Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Pratap,
You certainly pointed me in the right direction. The fix is shown below:
replace the the line of code -- rows(10).select
with -- xlsapp.rows(10).select.
Apparantly, using the "rows" property (or any other application property) without the application prefix ("xlsapp.") creates an orphan.
Thanks,
cfwti
You certainly pointed me in the right direction. The fix is shown below:
replace the the line of code -- rows(10).select
with -- xlsapp.rows(10).select.
Apparantly, using the "rows" property (or any other application property) without the application prefix ("xlsapp.") creates an orphan.
Thanks,
cfwti
It may be a good idea to close the workbook before quitting
---
Harish