View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Maintain integrity of Excel instances

Unless you are showing pseudo code, the code you show would only run in and
affect a single instance of excel and that is the instance where the code is
running.

--
Regards,
Tom Ogilvy



"XP" wrote:

Using Office 2003 and Windows XP;

This seems odd to me, but it seems that sometimes Application.Quit will shut
down a second running instance of Excel. I haven't thoroughly tested when
this occurs.
Am I just mistaken and/or confused having more than one instance running or
is this by design based on which instance happens to be active when the code
runs?

Is there a way to ensure the desired effect by returning a reference to the
current instance and quit only that one? Is it possible to use something like:

ThisWorkbook.Application.Quit

Could someone please help me out with some example code and discussion on
this?

Thanks much in advance for your assistance.