Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have "the phantom app Excel.EXE" issue, addressed on Tushar's site.
It happened in code where I create a new instance of excel and do lots of stuff. I have tried qualifying everything. Finally boiled down to the following lies of code that will produce the problem.. The line that adds a workbook seems to be the problem, although I have tried everything I could think of, even pausing and manually opening a blank workbook....still get the phantom on closing. Thanks for the help... Option Explicit Public XLNEW As Object Public XLUser As Object Sub NEWAPPTEST() Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") XLNEW.Workbooks.Add 'additional code here typically XLNEW.Workbooks().Close XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Here's how I would do it: Sub NEWAPPTEST() Dim xlWB As Object Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") Set xlWB = XLNEW.Workbooks.Add '/ now you can use xlWB for your operations on the workbook xlWB.Close False Set xlWB = Nothing XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: I have "the phantom app Excel.EXE" issue, addressed on Tushar's site. It happened in code where I create a new instance of excel and do lots of stuff. I have tried qualifying everything. Finally boiled down to the following lies of code that will produce the problem.. The line that adds a workbook seems to be the problem, although I have tried everything I could think of, even pausing and manually opening a blank workbook....still get the phantom on closing. Thanks for the help... Option Explicit Public XLNEW As Object Public XLUser As Object Sub NEWAPPTEST() Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") XLNEW.Workbooks.Add 'additional code here typically XLNEW.Workbooks().Close XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jake -
THANKS, but This does not address the issue. to see teh problem: CTR/ALT/DEL to pull up task manager Processes try to get to zero EXCEL.EXE instances after running the code (without clicking end process, or a system reboot) "Jake Marx" wrote: Hi, Here's how I would do it: Sub NEWAPPTEST() Dim xlWB As Object Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") Set xlWB = XLNEW.Workbooks.Add '/ now you can use xlWB for your operations on the workbook xlWB.Close False Set xlWB = Nothing XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: I have "the phantom app Excel.EXE" issue, addressed on Tushar's site. It happened in code where I create a new instance of excel and do lots of stuff. I have tried qualifying everything. Finally boiled down to the following lies of code that will produce the problem.. The line that adds a workbook seems to be the problem, although I have tried everything I could think of, even pausing and manually opening a blank workbook....still get the phantom on closing. Thanks for the help... Option Explicit Public XLNEW As Object Public XLUser As Object Sub NEWAPPTEST() Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") XLNEW.Workbooks.Add 'additional code here typically XLNEW.Workbooks().Close XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm not sure how you expect there to be 0 instances of Excel running (unless you're automating Excel from VB or something), as the current instance of Excel will not be shut down by the code you posted. If I run the code I posted, I'm left with only 1 instance of Excel - the instance I put the code in. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: Jake - THANKS, but This does not address the issue. to see teh problem: CTR/ALT/DEL to pull up task manager Processes try to get to zero EXCEL.EXE instances after running the code (without clicking end process, or a system reboot) "Jake Marx" wrote: Hi, Here's how I would do it: Sub NEWAPPTEST() Dim xlWB As Object Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") Set xlWB = XLNEW.Workbooks.Add '/ now you can use xlWB for your operations on the workbook xlWB.Close False Set xlWB = Nothing XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: I have "the phantom app Excel.EXE" issue, addressed on Tushar's site. It happened in code where I create a new instance of excel and do lots of stuff. I have tried qualifying everything. Finally boiled down to the following lies of code that will produce the problem.. The line that adds a workbook seems to be the problem, although I have tried everything I could think of, even pausing and manually opening a blank workbook....still get the phantom on closing. Thanks for the help... Option Explicit Public XLNEW As Object Public XLUser As Object Sub NEWAPPTEST() Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") XLNEW.Workbooks.Add 'additional code here typically XLNEW.Workbooks().Close XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Jake- Thanks again, maybe i have a syatem setting problem. Here is what I get on my PC, XL2003, XP Pro Start Task manager without Excel ZERO EXCEL.EXE open Excel One EXCEL.EXE Run code TWO EXCEL.EXE (even after code is done) Exit Excel STILL: ONE EXCEL.EXE [Repeat above process and I get TWO EXCEL.EXE without VISIBLE EXCEL WINDOWS] "Jake Marx" wrote: Hi, I'm not sure how you expect there to be 0 instances of Excel running (unless you're automating Excel from VB or something), as the current instance of Excel will not be shut down by the code you posted. If I run the code I posted, I'm left with only 1 instance of Excel - the instance I put the code in. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: Jake - THANKS, but This does not address the issue. to see teh problem: CTR/ALT/DEL to pull up task manager Processes try to get to zero EXCEL.EXE instances after running the code (without clicking end process, or a system reboot) "Jake Marx" wrote: Hi, Here's how I would do it: Sub NEWAPPTEST() Dim xlWB As Object Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") Set xlWB = XLNEW.Workbooks.Add '/ now you can use xlWB for your operations on the workbook xlWB.Close False Set xlWB = Nothing XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: I have "the phantom app Excel.EXE" issue, addressed on Tushar's site. It happened in code where I create a new instance of excel and do lots of stuff. I have tried qualifying everything. Finally boiled down to the following lies of code that will produce the problem.. The line that adds a workbook seems to be the problem, although I have tried everything I could think of, even pausing and manually opening a blank workbook....still get the phantom on closing. Thanks for the help... Option Explicit Public XLNEW As Object Public XLUser As Object Sub NEWAPPTEST() Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") XLNEW.Workbooks.Add 'additional code here typically XLNEW.Workbooks().Close XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does this occur when running the following code exactly as shown?
Public XLNEW As Object Public XLUser As Object Sub NEWAPPTEST() Dim xlWB As Object Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") Set xlWB = XLNEW.Workbooks.Add '/ now you can use xlWB for your operations on the workbook xlWB.Close False Set xlWB = Nothing XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub It works on my machine (similar setup to yours) - I only have one instance of Excel left, then zero after I quit the visible instance. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: Jake- Thanks again, maybe i have a syatem setting problem. Here is what I get on my PC, XL2003, XP Pro Start Task manager without Excel ZERO EXCEL.EXE open Excel One EXCEL.EXE Run code TWO EXCEL.EXE (even after code is done) Exit Excel STILL: ONE EXCEL.EXE [Repeat above process and I get TWO EXCEL.EXE without VISIBLE EXCEL WINDOWS] "Jake Marx" wrote: Hi, I'm not sure how you expect there to be 0 instances of Excel running (unless you're automating Excel from VB or something), as the current instance of Excel will not be shut down by the code you posted. If I run the code I posted, I'm left with only 1 instance of Excel - the instance I put the code in. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: Jake - THANKS, but This does not address the issue. to see teh problem: CTR/ALT/DEL to pull up task manager Processes try to get to zero EXCEL.EXE instances after running the code (without clicking end process, or a system reboot) "Jake Marx" wrote: Hi, Here's how I would do it: Sub NEWAPPTEST() Dim xlWB As Object Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") Set xlWB = XLNEW.Workbooks.Add '/ now you can use xlWB for your operations on the workbook xlWB.Close False Set xlWB = Nothing XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: I have "the phantom app Excel.EXE" issue, addressed on Tushar's site. It happened in code where I create a new instance of excel and do lots of stuff. I have tried qualifying everything. Finally boiled down to the following lies of code that will produce the problem.. The line that adds a workbook seems to be the problem, although I have tried everything I could think of, even pausing and manually opening a blank workbook....still get the phantom on closing. Thanks for the help... Option Explicit Public XLNEW As Object Public XLUser As Object Sub NEWAPPTEST() Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") XLNEW.Workbooks.Add 'additional code here typically XLNEW.Workbooks().Close XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for staying with this-
OK I turned off all addins rebooted launched excel cut & pasted your code in a new module of a "blank" workbook ran the code Got exactly the same results that I got last time NOT what you get on your machine I'm going to go through Tushar's method of disconnecting references and see what else I can think of.... "Jake Marx" wrote: Does this occur when running the following code exactly as shown? Public XLNEW As Object Public XLUser As Object Sub NEWAPPTEST() Dim xlWB As Object Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") Set xlWB = XLNEW.Workbooks.Add '/ now you can use xlWB for your operations on the workbook xlWB.Close False Set xlWB = Nothing XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub It works on my machine (similar setup to yours) - I only have one instance of Excel left, then zero after I quit the visible instance. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: Jake- Thanks again, maybe i have a syatem setting problem. Here is what I get on my PC, XL2003, XP Pro Start Task manager without Excel ZERO EXCEL.EXE open Excel One EXCEL.EXE Run code TWO EXCEL.EXE (even after code is done) Exit Excel STILL: ONE EXCEL.EXE [Repeat above process and I get TWO EXCEL.EXE without VISIBLE EXCEL WINDOWS] "Jake Marx" wrote: Hi, I'm not sure how you expect there to be 0 instances of Excel running (unless you're automating Excel from VB or something), as the current instance of Excel will not be shut down by the code you posted. If I run the code I posted, I'm left with only 1 instance of Excel - the instance I put the code in. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: Jake - THANKS, but This does not address the issue. to see teh problem: CTR/ALT/DEL to pull up task manager Processes try to get to zero EXCEL.EXE instances after running the code (without clicking end process, or a system reboot) "Jake Marx" wrote: Hi, Here's how I would do it: Sub NEWAPPTEST() Dim xlWB As Object Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") Set xlWB = XLNEW.Workbooks.Add '/ now you can use xlWB for your operations on the workbook xlWB.Close False Set xlWB = Nothing XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: I have "the phantom app Excel.EXE" issue, addressed on Tushar's site. It happened in code where I create a new instance of excel and do lots of stuff. I have tried qualifying everything. Finally boiled down to the following lies of code that will produce the problem.. The line that adds a workbook seems to be the problem, although I have tried everything I could think of, even pausing and manually opening a blank workbook....still get the phantom on closing. Thanks for the help... Option Explicit Public XLNEW As Object Public XLUser As Object Sub NEWAPPTEST() Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") XLNEW.Workbooks.Add 'additional code here typically XLNEW.Workbooks().Close XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jake -
Tanks for your help. I finally found it. With your help i knew it was my PC and not my code. Truns out I had loaded Act! 6.0 and it inserted its own addin that some how was causing the problem with a second instance. Aslso was holding a phantom of Word. I am working with Sage to resolve and will post back. Never would have figured it out without your help this weekend. So used to my code being the problem.... "Jake Marx" wrote: Does this occur when running the following code exactly as shown? Public XLNEW As Object Public XLUser As Object Sub NEWAPPTEST() Dim xlWB As Object Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") Set xlWB = XLNEW.Workbooks.Add '/ now you can use xlWB for your operations on the workbook xlWB.Close False Set xlWB = Nothing XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub It works on my machine (similar setup to yours) - I only have one instance of Excel left, then zero after I quit the visible instance. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: Jake- Thanks again, maybe i have a syatem setting problem. Here is what I get on my PC, XL2003, XP Pro Start Task manager without Excel ZERO EXCEL.EXE open Excel One EXCEL.EXE Run code TWO EXCEL.EXE (even after code is done) Exit Excel STILL: ONE EXCEL.EXE [Repeat above process and I get TWO EXCEL.EXE without VISIBLE EXCEL WINDOWS] "Jake Marx" wrote: Hi, I'm not sure how you expect there to be 0 instances of Excel running (unless you're automating Excel from VB or something), as the current instance of Excel will not be shut down by the code you posted. If I run the code I posted, I'm left with only 1 instance of Excel - the instance I put the code in. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: Jake - THANKS, but This does not address the issue. to see teh problem: CTR/ALT/DEL to pull up task manager Processes try to get to zero EXCEL.EXE instances after running the code (without clicking end process, or a system reboot) "Jake Marx" wrote: Hi, Here's how I would do it: Sub NEWAPPTEST() Dim xlWB As Object Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") Set xlWB = XLNEW.Workbooks.Add '/ now you can use xlWB for your operations on the workbook xlWB.Close False Set xlWB = Nothing XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: I have "the phantom app Excel.EXE" issue, addressed on Tushar's site. It happened in code where I create a new instance of excel and do lots of stuff. I have tried qualifying everything. Finally boiled down to the following lies of code that will produce the problem.. The line that adds a workbook seems to be the problem, although I have tried everything I could think of, even pausing and manually opening a blank workbook....still get the phantom on closing. Thanks for the help... Option Explicit Public XLNEW As Object Public XLUser As Object Sub NEWAPPTEST() Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") XLNEW.Workbooks.Add 'additional code here typically XLNEW.Workbooks().Close XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Glad to hear it. It's nice to know it's not always the code. <g
-Jake Vacation's Over wrote: Jake - Tanks for your help. I finally found it. With your help i knew it was my PC and not my code. Truns out I had loaded Act! 6.0 and it inserted its own addin that some how was causing the problem with a second instance. Aslso was holding a phantom of Word. I am working with Sage to resolve and will post back. Never would have figured it out without your help this weekend. So used to my code being the problem.... "Jake Marx" wrote: Does this occur when running the following code exactly as shown? Public XLNEW As Object Public XLUser As Object Sub NEWAPPTEST() Dim xlWB As Object Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") Set xlWB = XLNEW.Workbooks.Add '/ now you can use xlWB for your operations on the workbook xlWB.Close False Set xlWB = Nothing XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub It works on my machine (similar setup to yours) - I only have one instance of Excel left, then zero after I quit the visible instance. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: Jake- Thanks again, maybe i have a syatem setting problem. Here is what I get on my PC, XL2003, XP Pro Start Task manager without Excel ZERO EXCEL.EXE open Excel One EXCEL.EXE Run code TWO EXCEL.EXE (even after code is done) Exit Excel STILL: ONE EXCEL.EXE [Repeat above process and I get TWO EXCEL.EXE without VISIBLE EXCEL WINDOWS] "Jake Marx" wrote: Hi, I'm not sure how you expect there to be 0 instances of Excel running (unless you're automating Excel from VB or something), as the current instance of Excel will not be shut down by the code you posted. If I run the code I posted, I'm left with only 1 instance of Excel - the instance I put the code in. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: Jake - THANKS, but This does not address the issue. to see teh problem: CTR/ALT/DEL to pull up task manager Processes try to get to zero EXCEL.EXE instances after running the code (without clicking end process, or a system reboot) "Jake Marx" wrote: Hi, Here's how I would do it: Sub NEWAPPTEST() Dim xlWB As Object Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") Set xlWB = XLNEW.Workbooks.Add '/ now you can use xlWB for your operations on the workbook xlWB.Close False Set xlWB = Nothing XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Vacation's Over wrote: I have "the phantom app Excel.EXE" issue, addressed on Tushar's site. It happened in code where I create a new instance of excel and do lots of stuff. I have tried qualifying everything. Finally boiled down to the following lies of code that will produce the problem.. The line that adds a workbook seems to be the problem, although I have tried everything I could think of, even pausing and manually opening a blank workbook....still get the phantom on closing. Thanks for the help... Option Explicit Public XLNEW As Object Public XLUser As Object Sub NEWAPPTEST() Set XLUser = GetObject(, "excel.application") Set XLNEW = CreateObject("excel.application") XLNEW.Workbooks.Add 'additional code here typically XLNEW.Workbooks().Close XLNEW.Quit Set XLNEW = Nothing set xluser = nothing End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Application.Quit | Excel Programming | |||
vba advice how 2get a input box to quit by entering the word quit+ 4 a msgbox to disp | Excel Programming | |||
Quit | Excel Programming | |||
Excel Won't Quit | Excel Programming | |||
Exit-quit sub | Excel Programming |