The easiest way to do this is to have a hidden form open on startup and with the On_Close event of the form either use the RunApp function in a macro or the Shell function in code to open the application you want. when you close the application, the form will close, triggering the event.