+ Reply to Thread
Results 1 to 4 of 4

Send diferent emails based on range value

  1. #1
    Registered User
    Join Date
    01-11-2019
    Location
    Transilvania
    MS-Off Ver
    2007
    Posts
    10

    Send diferent emails based on range value

    Hi,

    I need an idea on how to setup ONE button in excel, that will:
    - pop-up a message before sending the email if a range is empty and open the email for sending, or
    - pop-up another message before sending the email, if the same range is not empty, and open the email for sending.

    The poped-up messages are not about what the range contains, but contain info about where the user should send the email.

    Thank you!

    Ella

  2. #2
    Forum Contributor
    Join Date
    08-08-2005
    Location
    Kansas, USA
    MS-Off Ver
    2016
    Posts
    292

    Re: Send diferent emails based on range value

    Try this:
    Please Login or Register  to view this content.
    You will need named ranges as indicated for ToList, CCLIst, Subject, Body1 and Body2.

  3. #3
    Registered User
    Join Date
    01-11-2019
    Location
    Transilvania
    MS-Off Ver
    2007
    Posts
    10

    Re: Send diferent emails based on range value

    hi, thanks for the prompt help.
    I cannot attach my file, but it does not do what I want it to do
    I want the button to bring me a message if my range is empty
    I want the same button to bring me a message if my range has data in it

    Please se if you can help.

    1.JPG
    thank you so much!

  4. #4
    Forum Contributor
    Join Date
    08-08-2005
    Location
    Kansas, USA
    MS-Off Ver
    2016
    Posts
    292

    Re: Send diferent emails based on range value

    This code should do what you want; I changed the IF statement to check whether D1 is blank, and if so, it will produce a message box before creating the email.

    Please Login or Register  to view this content.
    Put the code in a code module (if you don't have a code module, insert one in the VBA editor.). Attach the code to the button by right-clicking the button and selecting Assign Macro from the dialog box.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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