1 Reply Latest reply on Sep 22, 2016 11:25 AM by Patrick.Cashman

    Cant get CellEditor to close after script Run

    christopher.branch

      Hi,

       

      i wrote a script which uses the event handler in cellEditor to get the user to write a log message after he changed something in a cell.

      I now got the problem that if i run the script from the beginning i start the cell editor.

      It wont quit even when it seems to be gon it still is in the Task Manager

       

      CellEditor is not open

       

      Regards Christopher

        • 1. Re: Cant get CellEditor to close after script Run
          Patrick.Cashman

          windows - How to terminate process using VBScript - Stack Overflow

           

          Or a number of other methods which are basically similar: Google

           

          Or something like this example I use to terminate Library Manager, which in the past was known for hanging open:

           

          Sub Application_Quit()

                   Dim AllProcess

                   Dim Process

                   Dim strFoundProcess

                   Dim i

                   strFoundProcess = False

                   Set AllProcess = getobject("winmgmts:") 'create object

                   i = 0

                  

                   Do While i < 3 '3 is just a guess, make it bigger if needed.

                     For Each Process In AllProcess.InstancesOf("Win32_process") 'Get all the processes running in your PC

                       If (Instr (Ucase(Process.Name),"LIBRARYMANAGER.EXE") = 1) Then ' Replace with your application name in CAPS.

                        ' Msgbox Process.Name & " Application is already running"

                         Process.Terminate()

                         scripting.sleep (1000) 'Wait for a while to kill the process

                         strFoundProcess = True

                         Exit for

                       End If

                     Next

                     i = i + 1

                   Loop

                   Set AllProcess = Nothing

          End Sub