Use app.prevInstance in the startup section of your app:

Code:
If App.PrevInstance Then ' insert your code to exit gracefully