msgbox yes or no

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

MsgBox Range("sale!hr2").Value, vbYesNo

If vbYes Then
MsgBox "yes", vbOKOnly
End If
If vbNo Then
MsgBox "no", vbOKOnly
End If

it does both yes and no, im sure im missing something simple...i just dont
know what it is

thanks in advance
 
reply= MsgBox(Range("A1").Value, vbYesNo)

If reply = vbYes Then
MsgBox "yes", vbOKOnly
Else
MsgBox "no", vbOKOnly
End If


HTH
 
Dear Choice,

Try this:

If MsgBox(Range("sales!hr2"), vbYesNo) = vbYes Then
MsgBox "Yes"
Else
MsgBox "No"
End If

Best regards

John
 

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