Results 1 to 5 of 5

Thread: Excel - Closing an Instance

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    57

    Question

    I've got an ActiveX dll that opens up Excel and starts a workbook, puts information into the workbook, closes the workbook and saves the workbook. ' wrkObj.Close (True) '
    However, an instance of Excel remains open everytime. It's hidden but its on the task list and sucks up resources. There has to be a simple line of code that tells Excel to die already!
    Any help would be appreciated
    -Brad

  2. #2
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633
    set wrkObj=nothing
    Chemically Formulated As:
    Dr. Nitro

  3. #3
    Addicted Member
    Join Date
    Jan 2000
    Location
    Fresno, California, USA
    Posts
    195
    an App.Quit wouldn't hurt either.

  4. #4
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    I use the following when closing down my hidden copy of Excel:

    XLApp.Workbooks(1).Close SaveChanges:=True 'close and save workbook

    XLApp.Quit
    Set XLApp = nothing

  5. #5
    Lively Member
    Join Date
    Jul 2000
    Posts
    94

    Wink DIY

    You could just close it yourself if you made it visible:

    exApp.Visible = true

    ...and then you could just use the close button when you are finished with it

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