Need a "Confirmation Msg Box" to ask user "YES" or "NO"

A

ali

I need a "confirmation Message Box" to let the users to click either "YES"
(to continue) or "NO" (to terminate)
 
D

Daniel Pineault

Simply use the MsgBox Function

MsgBox(prompt[, buttons] [, title] [, helpfile, context])

where the 2ns input variable specifies which button whouls appear to the
user. In your case you'd want vbYesNo or vbOKCancel.

Look it up in the help file, it has an example that even shows you how to
get the users choice to then move forward with your code.
 
F

fredg

I need a "confirmation Message Box" to let the users to click either "YES"
(to continue) or "NO" (to terminate)

If MsgBox("Continue Y/N ", vbInformation + vbYesNo)= vbYes then
' Do the Yes Part
Else
' Do the No part
End If
 

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

Top