Results 1 to 2 of 2

Thread: How to kill/close an excel process by itself

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    77

    How to kill/close an excel process by itself

    Dim xl As New Excel.Application
    Dim wk As Excel.Workbook = xl.Workbooks.Add()
    xl.Cells(2, 2) = "its ok"
    wk.Close(SaveChanges:=True, FileName:=FN)
    wk = Nothing
    xl.Quit()
    xl = Nothing
    ==================

    that was the coding I wrote in the button click event. It does work fine...but it is creating a separate process every time, the event is fired...and the process from task manager could not get deleted automatically. If I click on button 5 times....5 processes named as "EXCEL.EXE" are staying in the processes of TaskManager.

    So, How to make the process to close byitself after the completion of its work.

  2. #2
    Addicted Member
    Join Date
    Aug 2002
    Location
    Luton, UK
    Posts
    178
    Where is the button ?
    If it is in Excel there is no need to run a separate instance.
    Regards
    BrianB
    -------------------------------

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