+ Reply to Thread
Results 1 to 7 of 7

Excel instances remain opened

  1. #1
    Gérard Ducouret
    Guest

    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. #2
    Tom Ogilvy
    Guest

    Re: 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" <gerard.ducouret@wanadooNOSPAM.fr> wrote in message
    news:%23SrYMjRzFHA.2348@TK2MSFTNGP15.phx.gbl...
    > 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. #3
    Simon Murphy
    Guest

    Re: 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" <gerard.ducouret@wanadooNOSPAM.fr> wrote in message
    news:%23SrYMjRzFHA.2348@TK2MSFTNGP15.phx.gbl...
    > 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. #4
    Vacation's Over
    Guest

    Re: 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" <gerard.ducouret@wanadooNOSPAM.fr> wrote in message
    > news:%23SrYMjRzFHA.2348@TK2MSFTNGP15.phx.gbl...
    > > 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. #5
    Tom Ogilvy
    Guest

    Re: Excel instances remain opened

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

    --
    Regards,
    Tom Ogilvy

    "Vacation's Over" <VacationsOver@discussions.microsoft.com> wrote in message
    news:014189D6-EA05-4947-8670-14EBC60683CB@microsoft.com...
    > 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" <gerard.ducouret@wanadooNOSPAM.fr> wrote in message
    > > news:%23SrYMjRzFHA.2348@TK2MSFTNGP15.phx.gbl...
    > > > 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. #6
    Vacation's Over
    Guest

    Re: 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" <VacationsOver@discussions.microsoft.com> wrote in message
    > news:014189D6-EA05-4947-8670-14EBC60683CB@microsoft.com...
    > > 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" <gerard.ducouret@wanadooNOSPAM.fr> wrote in message
    > > > news:%23SrYMjRzFHA.2348@TK2MSFTNGP15.phx.gbl...
    > > > > 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. #7
    Gérard Ducouret
    Guest

    Re: Excel instances remain opened

    Hello guys !
    Thanks all of you for your answers !

    Gérard

    "Simon Murphy" <tobinSimonMurphy@codematic.net> a écrit dans le message de
    news:%23iH61pSzFHA.3312@TK2MSFTNGP09.phx.gbl...
    > 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" <gerard.ducouret@wanadooNOSPAM.fr> wrote in message
    > news:%23SrYMjRzFHA.2348@TK2MSFTNGP15.phx.gbl...
    > > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1