MsgBox vba code example
Example 1: message box VBA
MsgBox "My Message", vbYesNo/vbMsgBox, "My Title"
Example 2: excel vba msgbox
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Do you want to continue ?"
Style = vbYesNo + vbCritical + vbDefaultButton2
Title = "MsgBox Demonstration"
Help = "DEMO.HLP"
Ctxt = 1000
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then
MyString = "Yes"
Else
MyString = "No"
End If
Example 3: msgbox yes no vba excel
If MsgBox("Texte", vbYesNo, "Titre") = vbYes Then