How do I trap the X button click event
Posted on 2004-09-14
I want to ask users "Are you sure you want to exit?" when the click the X on the top right of a window.
In the form_Terminate() event I have the following code which asks the question:-
Private Sub Form_Terminate()
Dim strResponse As String
strResponse = MsgBox("Are you sure?", vbOKCancel)
If strResponse = vbOK Then
What can I put in the else clause to keep the form open?