+ Reply to Thread
Results 1 to 3 of 3

MsgBox Nested Ifs

  1. #1
    Registered User
    Join Date
    10-13-2009
    Location
    PA
    MS-Off Ver
    Excel 2007
    Posts
    75

    MsgBox Nested Ifs

    Hello,

    I can't seem to get my code below to work if the user selects No for MSG1 and I'm not entirely sure why. Everything else works correctly, but if you select No it still takes you to MSG2. Any ideas?

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: MsgBox Nested Ifs

    If I understand correctly, If one select No in Msg1 then a message box appear saying action cancelled and end there. To accomplish this, you will have to code what to be done immediately after first line in above code.
    You code show Msg1 first and no matter what you select in Msg1, Msg2 appears. Proper code should be as below.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-13-2009
    Location
    PA
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: MsgBox Nested Ifs

    Interesting that simply moving MSG2 within MSG1's IF statement fixed the problem. I wouldn't have expected that to matter.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1