hi
i have got a form which if tried to close should get a message wid a yes no. if it is a no then the method should exit
i implemented Form_Unload as well as Form_QueryUnload, but as i exit the method the form gets closed ne way, wat do i do
Printable View
hi
i have got a form which if tried to close should get a message wid a yes no. if it is a no then the method should exit
i implemented Form_Unload as well as Form_QueryUnload, but as i exit the method the form gets closed ne way, wat do i do
VB Code:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) Dim res As Integer res = MsgBox("Are you sure you want to close this app ?", vbYesNo + vbQuestion, "Application shutdown") If res = vbNo Then Cancel = True End Sub