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 ' User chose Yes.
MyString = "Yes"
Else ' User chose No.
MyString = "No"
End If