Yes or No Msgbox not working

  • Hi all,




    Now for the problem. Every time I get to the second msgbox and click either yes or no, it only shows this line in the third msgbox:
    "Wow you are difficult. Now is your chance to go in the opposite direction."


    Any thoughts why? (Sorry if confusing)

  • Re: Yes or No Msgbox not working


    Hello


    You write:


    Code
    If YesOrNoAnswerToMessageBox = vbNo Then
            MsgBox "I would not have done that. Now your in trouble. Please try again.", vbYesNo
            If YesOrNoAnswerToMessageBox = vbNo Then


    So, at first you take No, so you enter the True part of the IF. AGAIN, you have the same condition which tests if you answered No on the first MsgBox. Obviously, this will be true (just as it was true the first time), hence, whatever you type you will also end up in the same part of the code.

    Regards,


    Wigi


    Excel MVP 2011-2014


    For more Excel memes: visit http://www.wimgielis.com ==> English articles ==> Excel memes


    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!