>Nick,
>
>Can I do this when I am using my Exit command button as well??
>
>Perry
You can, but it is not the right idea, because the application will not know that it has to do something before closing VFP app until you press your Exit button. If you defined what to do on sutdown while starting your app, then the procedure defined in your ON SHUTDOWN DO... will fire even if you try to restart Windows or shut down the computer.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison