After you have placed the return value into a variable, you can easily introduce logic into your program to respond to the user's selection : MsgBox « Language Basics « VBA / Excel / Access / Word
After you have placed the return value into a variable, you can easily introduce logic into your program to respond to the user's selection
Sub MessageBoxAnswer() Dim intAnswer As Integer
intAnswer = msgBox("Are You Sure?", vbYesNoCancel + vbQuestion, _
"Please Respond")
Select Case intAnswer
Case vbYes
msgBox "I'm Glad You are Sure!!"
Case vbNo
msgBox "Why Aren't You Sure??"
Case vbCancel
msgBox "You Coward! You Bailed Out!!" End Select End Sub