Can someone help me with 'vbyesno' message box

  • Thread starter Thread starter Devitt
  • Start date Start date
D

Devitt

I can seem to get it to work...
i just want it so when i click yes it executes some code

i've tried stuff like 'if vbyes = true then blah blah blah' and other
but it doesn't seem to wanna work....

[edit] o yea im usin xl 2k
 
Hi Devitt,

Try something like:

Sub Tester01()
Dim res As Long
res = MsgBox("Continue?", vbYesNo)
If res = vbYes Then
'Do something
Else
'Do somehing else
End If
End Sub
 
Cheers m8 but i already figured it out..

i jus did :
if msgbox("blahblah",vbyesno,etc,etc) = vb yes then
blah blah bla
 

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