LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Advanced issue; second instance of Excel will not go away!

If you are running code from within the new instance, I can't say much about
that. You code wouldn't see that, so I doubt it would create this type of
problem unless it leaves your new instance in a state where it can't be
closed. My comments were aimed at the code that creates the new instance.
No matter how few the lines are, there is usually ample opportunity to
create a ghost reference.

but see Tushar's link.

--
Regards,
Tom Ogilvy

"Vacation's Over" wrote in message
...
Thanks Tom

i'll review my code

One Follow up, my new instance immediately opens an addin where the

majority
of the code resides. It also opens a Template for displays.

I understand from your post that references to my template will need to be
qualified, however I just want to be sure that ThisWorkbook is still
considered a qualified reference.... example:
XLNewSpecial.MyTemplate.Sheets() and
ThisWorkbook.Sheets()


"Tom Ogilvy" wrote:

If you use any unqualified reference within your code you will get a

ghost
reference which you have no way of releasing and you experience what you

are
experiencing.

An unqualified reference might be

ActiveCell.value = 6

rather than

xlNewSpecial.ActiveCell.value = 6

--
Regards,
Tom Ogilvy


"Vacation's Over" wrote in

message
...
Excel 2003/XP Pro

Using the Windows Task Manager I seem to have a instance of Excel.exe

that
will not go away. My Addin creates a second instance of excel, works

some
code and then closes itself, or so I thought. The file closes, the

instance
disappears and returns me to the original instance, but I recently

noticed
that the windows task manager still shows a process (not using

resources
00)
. Even if i close the original instance the process list just drops

from 2
excel.exe on list to one. Although i have tried numerous manual and

code
methods for closing I can only clear the Task manager list by

rebooting.

if i run ym code it creates a list item in task manager for each run,

so
without reboot I can get a long list.

Should I be concerned? Am i missing something in the shutdown?
Have listed the basic code snippits below


Public XLNewSpecial As Object
Public XLUser As Object

Set XLUser = GetObject(, "excel.application")
' so I can call the original instance when needed

Set XLNewSpecial = CreateObject("excel.application")
Application.Visible = True ' along withother settings

'code here to do suff

'explicit closing code

XLNewSpecial .Quit
Set XLNewSpecial = Nothing


The code looks like it works fine with the exception that the Task

Manager
will not release my special instance of Excel with out a reboot. to be
specific WTM shhows a process but not the application, after my

closing.






 
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
Advanced Filter - Criteria Range issue Tina Excel Discussion (Misc queries) 4 June 11th 09 03:28 PM
advanced filter issue Joseph Atie Excel Discussion (Misc queries) 5 December 8th 08 01:18 AM
Advanced Filter Issue Abbasi Excel Discussion (Misc queries) 3 April 14th 08 12:41 PM
Advanced Filter Issue [email protected] Excel Discussion (Misc queries) 1 April 26th 06 10:49 PM
Advanced Sortting Issue Sean DeBruler Excel Discussion (Misc queries) 2 November 11th 05 01:26 AM


All times are GMT +1. The time now is 06:47 PM.

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

About Us

"It's about Microsoft Excel"