Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Maintain integrity of Excel instances

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Maintain integrity of Excel instances

Hi Tom,

Okay, then I think maybe I was confused by opening other files in the
"coded" instance, then when it closed it of course closed all open files in
that instance, but I was thinking the secondary files were opened in a
separate instance.

But for clarity, what do you mean by pseudo code? - like running VBA from a
VBScript or bat file?

Thanks for reply and clarifying...

"Tom Ogilvy" wrote:

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Maintain integrity of Excel instances

j = 2
for i over each value of 1 to 3
row(i).copy to Sheet2 in row j
j++
Next i

that is what I mean by pseudo code - describing the concept, but not taking
the time to write the actual code that would executable.

You are correct that these workbooks are being opened in the same instance
of excel.

--
regards,
Tom Ogilvy


"XP" wrote:

Hi Tom,

Okay, then I think maybe I was confused by opening other files in the
"coded" instance, then when it closed it of course closed all open files in
that instance, but I was thinking the secondary files were opened in a
separate instance.

But for clarity, what do you mean by pseudo code? - like running VBA from a
VBScript or bat file?

Thanks for reply and clarifying...

"Tom Ogilvy" wrote:

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.

Reply
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
How do I alphabetize & concatenate cells & maintain row integrity D_B Excel Worksheet Functions 3 November 25th 09 03:23 PM
creating hyperlinks in excel that won't lose integrity when file m Allison Excel Worksheet Functions 3 March 20th 07 02:52 PM
Excel-update spreadsheet, keeping integrity KP Excel Discussion (Misc queries) 1 November 18th 05 12:46 AM
Formula Integrity Not Preserved During Sort in Excel 2000 Kevin Excel Discussion (Misc queries) 1 April 15th 05 10:26 PM
Excel vba query - data integrity Rachel Curran Excel Programming 10 July 8th 04 09:12 AM


All times are GMT +1. The time now is 05:15 AM.

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

About Us

"It's about Microsoft Excel"