I have the following code for when a user closes a form
How can I cancel the close event when the user selects no?
Kind regards,
Hans B.
Code:
Private Sub Form_Close()
vconfirm = MsgBox("Are you sure you want to quit", vbYesNo, "IT problemlog")
Select Case vconfirm
Case vbYes
'form will close
Case vbNo
'don't close the form
End Select
End Sub
How can I cancel the close event when the user selects no?
Kind regards,
Hans B.