Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I alphabetize & concatenate cells & maintain row integrity | Excel Worksheet Functions | |||
creating hyperlinks in excel that won't lose integrity when file m | Excel Worksheet Functions | |||
Excel-update spreadsheet, keeping integrity | Excel Discussion (Misc queries) | |||
Formula Integrity Not Preserved During Sort in Excel 2000 | Excel Discussion (Misc queries) | |||
Excel vba query - data integrity | Excel Programming |