+ Reply to Thread
Results 1 to 2 of 2

Check Box wth MsgBox. If Yes then.. If No then..

  1. #1
    Registered User
    Join Date
    11-09-2015
    Location
    Peterborough
    MS-Off Ver
    MS Office 2013
    Posts
    3

    Check Box wth MsgBox. If Yes then.. If No then..

    Hello All,

    My understanding of VBA is very basic, so any help concerning this will be much appreciated.

    The below script delivers two aims

    Step 1) Changes the colour of the allocated cells and adds a user stamp
    Step 2) Sends an email depending on whether yes/no is selected.

    ------------------------------------------------
    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    -----------------------------------------------------------------------------------------

    When part 1 was successful, i'm failing in delivering part 2.

    My aim is, when yes or no is selected an email is generated, this email will be set to .Display so if any editing is required it can be done before the email is sent.

    The text in Red is where the error begins, however i'm unable to overcome the problem.


    Please can anyone help?

    Thank you in advance.

    Kind Regards.
    Last edited by 6StringJazzer; 11-10-2015 at 12:08 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,719

    Re: Check Box wth MsgBox. If Yes then.. If No then..

    The text in Red is where the error begins, however i'm unable to overcome the problem.
    Always describe error messages and behavior when you say there is a problem.

    I see a few problems.

    There are no variables Yes or No declared or set.

    There is no End If to match your final If.

    Your code is creating the mail item only if Yes is true. It must always create the mail item, because you send a mail item either way. You can remove the If/End If from around this code.

    I think if you fix those things it will work. It worked for me.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to capture MsgBox prompt to a string variable but ignore the MsgBox
    By BuglerDobbs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-07-2015, 10:56 AM
  2. [SOLVED] Check cell and return MsgBox if not a number
    By L plates in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-13-2015, 08:36 AM
  3. [SOLVED] Problem with VBA Editor uses lower case on some lines (ex. msgbox instead of MsgBox)
    By stubbsj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-14-2013, 06:59 PM
  4. [SOLVED] VBA. Check office user name, if certain format is not met then MsgBox and exit workbook
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-09-2012, 06:58 AM
  5. Check range if multiple names exist then show msgbox
    By c.pedersen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2012, 06:23 AM
  6. Code To Check blank textbox in userform with yes no msgbox
    By jwala in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-01-2010, 05:32 AM
  7. Replies: 1
    Last Post: 11-29-2010, 06:56 AM

Tags for this Thread

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