Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default quit app - Tushar Mehta HELP

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default quit app - Tushar Mehta HELP

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default quit app - Tushar Mehta HELP

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default quit app - Tushar Mehta HELP

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default quit app - Tushar Mehta HELP


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default quit app - Tushar Mehta HELP

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default quit app - Tushar Mehta HELP

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default quit app - Tushar Mehta HELP

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default quit app - Tushar Mehta HELP

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
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
Application.Quit Murat Demir HEKIMOGLU Excel Programming 1 August 23rd 05 01:01 PM
vba advice how 2get a input box to quit by entering the word quit+ 4 a msgbox to disp RELWOD85[_4_] Excel Programming 3 August 1st 05 07:11 PM
Quit solomon_monkey[_2_] Excel Programming 7 July 6th 05 05:18 PM
Excel Won't Quit Rex Excel Programming 13 May 11th 05 01:51 PM
Exit-quit sub Tom Excel Programming 3 March 11th 05 03:50 PM


All times are GMT +1. The time now is 08:25 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"