Community discussion forum

Excel Issues

  • 1 year ago

    I have a referrence to Excel 12.0 Object Library in my application. I have made the visible set to false for Excel and doing all my work. When iam trying to terminate the excel while application termination it is closing all the other opened excel workbooks.

    Please give a solution.
    The code is somewhat like this:

    Try
    Dim pProcess As Process
    exlHandle = oexcel.Hwnd
    GetWindowThreadProcessId(exlHandle, exlProcessId)
    pProcess = System.Diagnostics.Process.GetProcessById(exlProce ssId)
    pProcess.Kill()
    Catch ex As Exception
    Return
    End Try



    Thanks in Advance
    Murali Krishna

  • 1 year ago

    You might find some pointers that help in this post:

    http://www.craigmurphy.com/blog/?p=82

    Please note that this post is not a direct recommendation to invoke the garbage collector, it is provided as a learning experience only.

     

Post a reply

Enter your message below

Sign in or Join us (it's free).

We'd love to hear what you think! Submit ideas or give us feedback