Carl,
CLEAR EVENTS will only do something if there is a READ EVENTS in place:
do form xyz
read events
messagebox( "we're outta here" )
return
now in your form once you issue the CLEAR EVENTS you'll see the messagebox popup and then your app will be gone.
>I need a simple Command button, which exits. My APP goes from main.prg and calls a form. I some code which will exit it back to the main.prg and close the form. Curently I have tried EXIT but this just creates a nesting error and so I have CLEAR EVENTS but this does nothing that I can see ?