Msg Box in IF statement?

  • Thread starter Thread starter Guest
  • Start date Start date
You might try something like the following:


Dim Resp As VbMsgBoxResult
Resp = MsgBox(prompt:="Do you want to do something?", Buttons:=vbYesNo)
If Resp = vbYes Then
' code if user clicked 'Yes'
Else
' code if user clicked 'No'
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top