Message Box Result

G

Guest

I have a Yes / No message box but I don't know what the code is from the
results. I think I need to use vbMsgBoxResult within vb but I'm not sure
where it fits into the coding!

Help!
 
N

Nikos Yannacopoulos

Pap,

Instead of just MsgBox (Prompt, Type, Title), use a variable to collect
the response, like:

vResponse = MsgBox (Prompt, Type, Title)

and then,

If vResponse = vbYes Then
'code to execute if Yesv
Else
'code to execute if No
End If

HTH,
Nikos
 

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