+ Reply to Thread
Results 1 to 6 of 6

Adding a Message box for confirmation VB Excel 2003

  1. #1
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Question Adding a Message box for confirmation VB Excel 2003

    Adding a Message box for confirmation VB Excel 2003

    I was sent by someone some awesome code but they are way to complex for me to play around in as they do multiple tasks in one code.

    I have the following code in one of my worksheet:

    Please Login or Register  to view this content.
    I need help in adding something to this code:

    If “yes” is selected then add a msgbox to say the following:

    This will be transfer to MERX.

    Instead of “yes” and “Cancel” it would need to say “Accept” and “Cancel”

    If “Accept” is selected then run Script, if “Cancel” is selected then do nothing.

    Can someone help me?

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Adding a Message box for confirmation VB Excel 2003

    Hi Excelnoub,

    Is this what you want?


    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Adding a Message box for confirmation VB Excel 2003

    It works perfecaly xladept Thank you.

    Is there a way to add more to it or will I need to creat a sort of form...

    Example:

    Please Login or Register  to view this content.
    But instead of having vbYesNo to have "Accept" or "Cancel"

    If "Accept" is clicked then proceed with the code and;
    If "Cancel" is clicked then do nothing only clear Cells(Target.Row, 13)).ClearContents

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Adding a Message box for confirmation VB Excel 2003

    You can add more to it, then test Msg for vbOK or vbCancel - I don't know how to change the "OK" to "Accept" but I believe it can be done.

  5. #5
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Adding a Message box for confirmation VB Excel 2003

    I think I found the end result :D

    Thanks for all the help

    Here is the code:

    Please Login or Register  to view this content.
    I will just need to figure out the vbYesNo + vbCritical to change it to Accept and Cancel.

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Adding a Message box for confirmation VB Excel 2003

    You're 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