Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel lines remain visible in other programs | Excel Discussion (Misc queries) | |||
re-install excel 2007 (macros remain?) | Excel Discussion (Misc queries) | |||
stop excel file opened as read only if already opened by another u | Excel Programming | |||
Preventing Excel opened through webbrowser "taking over" other instances of Excel | Excel Programming | |||
Multiple instances of the same file being opened | Excel Programming |