ON SHUTDOWN &&No arguments ON SHUTDOWN QUIT ON SHUTDOWN CLEAR EVENTS ON SHUTDOWN DO ClosePrg &&Calls a program to do anything you want, bring up dialog boxes, or any other setup.Try any one of this towards thie top of your main program. Let me know if none of this solve your problem.