Answers for "vba yes no box"

1

vba yes no box

Dim answer As Integer
answer = MsgBox("Text", vbQuestion + vbYesNo + vbDefaultButton2, "Message Box Title")
If answer = vbYes Then
  MsgBox "Yes"
Else
  MsgBox "No"
End If
Posted by: Guest on June-21-2021
0

vba yes no box

Sub effacerB2()

    If MsgBox("Etes-vous certain de vouloir supprimer le contenu de B2 ?", vbYesNo, "Demande de confirmation") = vbYes Then
        Range("B2").ClearContents
        MsgBox "Le contenu de B2 a été effacé !"
    End If

End Sub
Posted by: Guest on March-24-2021

Browse Popular Code Answers by Language