What is the event that controls the close button (the X button on top) on a form. I have an exit button on the form and I want that to behave differently then the close button.
Thanks for you help.
Assuming you have your own close button, you may consider this:
Have a global boolean variable, say bCloseOK
In the Unload event procedure of the form:
Cancel = Not bCloseOK
In the Click event procedure of your own close button:
bCloseOK = True
' your close stuff here
Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.