Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Excel instances remain opened

Hello
I'm trying to create a new instance of Excel (from MS Project) with the
following :

Set XLApp = New Excel.Application
If XLApp Is Nothing Then
Set XLApp = New Excel.Application
End If

then to close it by :
XLApp.Workbooks.Close
Set XLApp = Nothing

but all the Excel instances remain opened : in the Tasks Manager of Win 2000
I have as many EXCEL instances than I ran the macro.

Thanks for help,

Gérard Ducouret


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel instances remain opened

http://support.microsoft.com/default...b;en-us;178510
PRB: Excel Automation Fails Second Time Code Runs

http://support.microsoft.com/default...b;EN-US;189618
PRB: Automation Error Calling Unqualified Method or Property


http://support.microsoft.com/?kbid=199219
XL2000: Automation Doesn't Release Excel Object from Memory


--
Regards,
Tom Ogilvy

"Gérard Ducouret" wrote in message
...
Hello
I'm trying to create a new instance of Excel (from MS Project) with the
following :

Set XLApp = New Excel.Application
If XLApp Is Nothing Then
Set XLApp = New Excel.Application
End If

then to close it by :
XLApp.Workbooks.Close
Set XLApp = Nothing

but all the Excel instances remain opened : in the Tasks Manager of Win

2000
I have as many EXCEL instances than I ran the macro.

Thanks for help,

Gérard Ducouret




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Excel instances remain opened

Gérard
You are not quitting Excel
Try
xlapp.workbooks.close
xlapp.quit
set xlapp = nothing

note workbooks.close is going to throw up a msgbox to save changes
better to use
xlapp.worksbooks(1).close savechanges:=true (or false)
cheers
Simon

"Gérard Ducouret" wrote in message
...
Hello
I'm trying to create a new instance of Excel (from MS Project) with the
following :

Set XLApp = New Excel.Application
If XLApp Is Nothing Then
Set XLApp = New Excel.Application
End If

then to close it by :
XLApp.Workbooks.Close
Set XLApp = Nothing

but all the Excel instances remain opened : in the Tasks Manager of Win
2000
I have as many EXCEL instances than I ran the macro.

Thanks for help,

Gérard Ducouret




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Excel instances remain opened

Tom-

I have been working on a simmilar problem that seems to be machine specific.

Even running the code from Microsoft in your second reference to this
answer(shown below), my machine will not release the reference and Task
Manager holds on to the instance(EXCEL.EXE)??run it 5 times get 5 instances
that do not go away...

I have cut & pasted to another PC and it works the way you and MS say it
should.

I have unloaded all Addins in Excel and VBE.

Rebooted and have "nothing" else running.

"nothing" = MSspyware beta & Norton Systemworks 2005

I'm running XP pro & XL2003

Any Ideas where to look next?

CODE From Site:

Option Explicit

Private Sub Command1_Click()
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets("Sheet1")
xlSheet.Range(xlSheet.Cells(1, 1), xlSheet.Cells(10, 2)).Value =
"Hello"
xlBook.Saved = True
XlBook.close
Set xlSheet = Nothing
Set xlBook = Nothing
xlApp.Quit
Set xlApp = Nothing
End Sub

"Tom Ogilvy" wrote:

http://support.microsoft.com/default...b;en-us;178510
PRB: Excel Automation Fails Second Time Code Runs

http://support.microsoft.com/default...b;EN-US;189618
PRB: Automation Error Calling Unqualified Method or Property


http://support.microsoft.com/?kbid=199219
XL2000: Automation Doesn't Release Excel Object from Memory


--
Regards,
Tom Ogilvy

"GĂ©rard Ducouret" wrote in message
...
Hello
I'm trying to create a new instance of Excel (from MS Project) with the
following :

Set XLApp = New Excel.Application
If XLApp Is Nothing Then
Set XLApp = New Excel.Application
End If

then to close it by :
XLApp.Workbooks.Close
Set XLApp = Nothing

but all the Excel instances remain opened : in the Tasks Manager of Win

2000
I have as many EXCEL instances than I ran the macro.

Thanks for help,

GĂ©rard Ducouret





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel instances remain opened

I don't have any fresh ideas based on what you have told us.

--
Regards,
Tom Ogilvy

"Vacation's Over" wrote in message
...
Tom-

I have been working on a simmilar problem that seems to be machine

specific.

Even running the code from Microsoft in your second reference to this
answer(shown below), my machine will not release the reference and Task
Manager holds on to the instance(EXCEL.EXE)??run it 5 times get 5

instances
that do not go away...

I have cut & pasted to another PC and it works the way you and MS say it
should.

I have unloaded all Addins in Excel and VBE.

Rebooted and have "nothing" else running.

"nothing" = MSspyware beta & Norton Systemworks 2005

I'm running XP pro & XL2003

Any Ideas where to look next?

CODE From Site:

Option Explicit

Private Sub Command1_Click()
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets("Sheet1")
xlSheet.Range(xlSheet.Cells(1, 1), xlSheet.Cells(10, 2)).Value =
"Hello"
xlBook.Saved = True
XlBook.close
Set xlSheet = Nothing
Set xlBook = Nothing
xlApp.Quit
Set xlApp = Nothing
End Sub

"Tom Ogilvy" wrote:

http://support.microsoft.com/default...b;en-us;178510
PRB: Excel Automation Fails Second Time Code Runs

http://support.microsoft.com/default...b;EN-US;189618
PRB: Automation Error Calling Unqualified Method or Property


http://support.microsoft.com/?kbid=199219
XL2000: Automation Doesn't Release Excel Object from Memory


--
Regards,
Tom Ogilvy

"Gérard Ducouret" wrote in message
...
Hello
I'm trying to create a new instance of Excel (from MS Project) with

the
following :

Set XLApp = New Excel.Application
If XLApp Is Nothing Then
Set XLApp = New Excel.Application
End If

then to close it by :
XLApp.Workbooks.Close
Set XLApp = Nothing

but all the Excel instances remain opened : in the Tasks Manager of

Win
2000
I have as many EXCEL instances than I ran the macro.

Thanks for help,

Gérard Ducouret









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Excel instances remain opened

Tom Thanks, Comming from you that meant it was not an Excel issue

Turns out i had downloaded ACT! 6.0
It was loading its own addin into Excel
when I looked at Task manager Word also had a "phantom instance"
I uninstalled ACT! 6.0 and the problem went away

I will post over to Sage Act! and find out if there is a fix, short of
uninstalling.

Will post back

Thanks again, for helping me know where not to look.

"Tom Ogilvy" wrote:

I don't have any fresh ideas based on what you have told us.

--
Regards,
Tom Ogilvy

"Vacation's Over" wrote in message
...
Tom-

I have been working on a simmilar problem that seems to be machine

specific.

Even running the code from Microsoft in your second reference to this
answer(shown below), my machine will not release the reference and Task
Manager holds on to the instance(EXCEL.EXE)??run it 5 times get 5

instances
that do not go away...

I have cut & pasted to another PC and it works the way you and MS say it
should.

I have unloaded all Addins in Excel and VBE.

Rebooted and have "nothing" else running.

"nothing" = MSspyware beta & Norton Systemworks 2005

I'm running XP pro & XL2003

Any Ideas where to look next?

CODE From Site:

Option Explicit

Private Sub Command1_Click()
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets("Sheet1")
xlSheet.Range(xlSheet.Cells(1, 1), xlSheet.Cells(10, 2)).Value =
"Hello"
xlBook.Saved = True
XlBook.close
Set xlSheet = Nothing
Set xlBook = Nothing
xlApp.Quit
Set xlApp = Nothing
End Sub

"Tom Ogilvy" wrote:

http://support.microsoft.com/default...b;en-us;178510
PRB: Excel Automation Fails Second Time Code Runs

http://support.microsoft.com/default...b;EN-US;189618
PRB: Automation Error Calling Unqualified Method or Property


http://support.microsoft.com/?kbid=199219
XL2000: Automation Doesn't Release Excel Object from Memory


--
Regards,
Tom Ogilvy

"GĂ©rard Ducouret" wrote in message
...
Hello
I'm trying to create a new instance of Excel (from MS Project) with

the
following :

Set XLApp = New Excel.Application
If XLApp Is Nothing Then
Set XLApp = New Excel.Application
End If

then to close it by :
XLApp.Workbooks.Close
Set XLApp = Nothing

but all the Excel instances remain opened : in the Tasks Manager of

Win
2000
I have as many EXCEL instances than I ran the macro.

Thanks for help,

GĂ©rard Ducouret








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Excel instances remain opened

Hello guys !
Thanks all of you for your answers !

Gérard

"Simon Murphy" a écrit dans le message de
...
Gérard
You are not quitting Excel
Try
xlapp.workbooks.close
xlapp.quit
set xlapp = nothing

note workbooks.close is going to throw up a msgbox to save changes
better to use
xlapp.worksbooks(1).close savechanges:=true (or false)
cheers
Simon

"Gérard Ducouret" wrote in message
...
Hello
I'm trying to create a new instance of Excel (from MS Project) with the
following :

Set XLApp = New Excel.Application
If XLApp Is Nothing Then
Set XLApp = New Excel.Application
End If

then to close it by :
XLApp.Workbooks.Close
Set XLApp = Nothing

but all the Excel instances remain opened : in the Tasks Manager of Win
2000
I have as many EXCEL instances than I ran the macro.

Thanks for help,

Gérard Ducouret






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
Excel lines remain visible in other programs Mike.Plog Excel Discussion (Misc queries) 0 September 22nd 09 08:52 PM
re-install excel 2007 (macros remain?) Jason Excel Discussion (Misc queries) 2 June 9th 09 12:54 AM
stop excel file opened as read only if already opened by another u bobm Excel Programming 3 August 5th 05 04:11 PM
Preventing Excel opened through webbrowser "taking over" other instances of Excel Samuel Jack Excel Programming 1 May 5th 04 11:11 AM
Multiple instances of the same file being opened flashpoint Excel Programming 2 September 9th 03 04:06 AM


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