- Il suffit de mettre ce code à l'évenement Form_Unload
-
- Private Sub Form_Unload(Cancel As Integer)
- Dim Rep As VbMsgBoxResult
- Rep = MsgBox("Vous êtes sûr de vouloir quitter ?", vbYesNo + vbQuestion, "Confirmation de sortie")
- If Rep = vbNo Then
- Cancel = True
- End If
- End Sub
Il suffit de mettre ce code à l'évenement Form_Unload
Private Sub Form_Unload(Cancel As Integer)
Dim Rep As VbMsgBoxResult
Rep = MsgBox("Vous êtes sûr de vouloir quitter ?", vbYesNo + vbQuestion, "Confirmation de sortie")
If Rep = vbNo Then
Cancel = True
End If
End Sub