Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbYesNoCancel - What's Going On?

Status
Not open for further replies.

sha76

Programmer
Sep 2, 2002
5,085
GB
I've got a message box as follows:
Code:
MsgBox(
"Instructions"
Code:
, vbYesNoCancel)
It's fine if the user selects 'Yes', but if either 'No' or 'Cancel' are selected it returns a value of 3(vbAbort). Am I missing something here?

Thanks for your help

Sharon
 
That's odd. Either something else in your code isn't quite right, or your Excel is messing up. If after restarting this still occurs, post a little more of your code around it. I bet we can help.
Rob
[flowerface]
 
Amazing how you spot your own mistakes when you try & explain your code to someone else! Does help if you assign the value of your message box to a variable before trying to use it in an if statement!
Oh well, caffine obviously not working today. Thanks for your help,

Sharon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top