Select Case MsgBox("Would you like to save the file somefile.txt?", _
vbApplicationModal + vbQuestion + YesNoCancel, App.Title) Case vbYes 'Save then file Case vbNo 'Do something for No Case vbCancel 'Do something else for Cancel End Select 'This method works well, unless you need to save the 'answer from your Select Case for later use. If you do, 'you'll need to use the more standard form of 'prompting for the answer in a variable. The following code sample demonstrates an easy way to display and process a message box (MsgBox) in any version of Visual Basic: |