+ Reply to Thread
Results 1 to 12 of 12

Message box code

  1. #1
    Forum Contributor
    Join Date
    07-08-2012
    Location
    beirut
    MS-Off Ver
    Excel 2010
    Posts
    102

    Message box code

    Hello,
    I have a code already written to execute an operation in a selected sheet. (sheet 23)
    I need help writing a code in a message box.
    If I enter in column L (in sheet 23) the word "BAB", the code should show me the message box saying: "Are you sure about the information?" with 2 options below "YES" and "NO".
    If I select yes, I want it to execute my code.
    If I select no, I want it to only make the message box diasppear, without executing anything.
    Thanks for your help.

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Message box code

    Hi.

    Try this code:

    Please Login or Register  to view this content.
    Click *, if my suggestion helps you. Have a good day!!

  3. #3
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Message box code

    Hi,

    copy this to the Worksheet module of Sheet 23.
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    07-08-2012
    Location
    beirut
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: Message box code

    Sorry if I didn't make myself clear enough.
    The code I already have is activated when selecting "BAB" in any row of the column L

    Please Login or Register  to view this content.
    What I need to do is to create a message box that appears when I select in column L the word "BAB" to let me confirm that the information entered are true. If I select Yes, I want it to execute the previous code, and if I select No, I want it to dismiss the message without doing anything so I can edit my information again.
    Thanks

  5. #5
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Message box code

    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Message box code

    Check this:

    Please Login or Register  to view this content.
    Last edited by jraj1106; 01-16-2013 at 05:41 AM.

  7. #7
    Forum Contributor
    Join Date
    07-08-2012
    Location
    beirut
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: Message box code

    Thanks alot, it works perfectly

  8. #8
    Forum Contributor
    Join Date
    07-08-2012
    Location
    beirut
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: Message box code

    When I select NO, the code execution stops, but the word in column L stays (BAB). How can I clear it?

  9. #9
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Message box code

    I have included the code for clearing col L. Check the above code that I had posted previously.Its just this:

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    07-08-2012
    Location
    beirut
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: Message box code

    Thank you for your help

  11. #11
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Message box code

    Please Login or Register  to view this content.

  12. #12
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Message box code

    You are welcome.

+ 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