Sub YesNOTest()
Dim answer As Integer
 
answer = MsgBox("Yes or No?", vbQuestion + vbYesNo + vbDefaultButton2, "Box Title")

If answer = vbYes Then
  MsgBox "Yes"
Else
  MsgBox "No"
End If
End Sub