Results 1 to 26 of 26

Thread: can't close Excel ! --- workaround found but now doesn't work any more !!!!

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904

    can't close Excel ! --- workaround found but now doesn't work any more !!!!

    I have a funky problem w/ Excel. I open an existing XLS file, activate a sheet, work create some charts on the sheet, then close the app, BUT it doesn't close. Here's the code:

    VB Code:
    1. '  in a public module, I have:
    2.     Public xlApp As excel.Application
    3.  
    4.     ' everything here down is in same module
    5.     ' "open" code
    6.     ' prior to executing these statements, task mgr shows no Excel
    7.     Set xlApp = New excel.Application
    8.     xlApp.Workbooks.Open xlsfilename
    9.     ' excel instance now shown by task mgr
    10.  
    11.     ' work with excel app here
    12.  
    13.     ' "close" code
    14.     xlApp.DisplayAlerts = False
    15.     xlApp.ActiveWorkbook.Close SaveChanges:=True, filename:=xlsfilename
    16.     xlApp.Quit
    17.     Set xlApp = Nothing
    18.    
    19.     ' at this point, task manager shows an open instance of Excel
    20.     ' but WHY ???

    I have created some chart objects while working in the sheet, but I set them back to nothing (Set chart1 = Nothing) before leaving the function that manipulates them.

    I can't see why Excel stays open. Once I close my VB app, the hidden instance of Excel goes away, but it SHOULD go away when I close it and quit it and set it to nothing, right ?

    What else can I do to get rid of it (short of manual intervention via the task manager, which isn't an option for my computer-illiterate users).

    Thanks for any help
    Last edited by phinds; Sep 24th, 2002 at 05:12 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width