PDA

Click to See Complete Forum and Search --> : Intercept close button


Krushstone
Mar 9th, 2001, 01:56 PM
Hi

How do I intercept when the user click the X button in my app so I can ask the user if he really wants to quit?

And what about intercepting the minimize button?

thanks

Krushstone

Mar 9th, 2001, 02:17 PM
Private Sub Form_Unload(Cancel As Integer)
If MsgBox("Are you sure you want to quit?", vbYesNo, "MyApp") = vbNo Then Cancel = True
End Sub