MsgBox
Résolu
Serval07
Messages postés
15
Statut
Membre
-
Polux31 Messages postés 7219 Statut Membre -
Polux31 Messages postés 7219 Statut Membre -
Bonjour, j`ai un autre probleme.J`ai un Msgbox dans un bouton pour quitter un userform.Si l`utilisataire clique sur oui alors le userform va ceux fermer mais si il choisi non alors tout doit continué comme si il c`était rien passé. Le msgbox marche seulement quand on a choisi l`option oui.Voici mon code :
Private Sub CommandButton1_Click()
MsgBox "Are you sure you want to cancel the operations", vbYesNo, "Cabling Sheet"
If vbYes Then
Unload UserForm1
Else
MsgBox ("Vous pouvez continuer")
UserForm1.Show
End If
End Sub
Private Sub CommandButton1_Click()
MsgBox "Are you sure you want to cancel the operations", vbYesNo, "Cabling Sheet"
If vbYes Then
Unload UserForm1
Else
MsgBox ("Vous pouvez continuer")
UserForm1.Show
End If
End Sub
4 réponses
Bonjour, je viens de trouver la solution a mon problème.
Voici le code
Private Sub CommandButton1_Click()
answer = MsgBox("Are you sure you want to cancel the operations? ", vbYesNo + vbCritical, "Cabling Sheet") '
If answer = vbYes Then
Unload Me
End If
End Sub
Voici le code
Private Sub CommandButton1_Click()
answer = MsgBox("Are you sure you want to cancel the operations? ", vbYesNo + vbCritical, "Cabling Sheet") '
If answer = vbYes Then
Unload Me
End If
End Sub