+ 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
    293

    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
    293

    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)

Similar Threads

  1. [SOLVED] send different emails based on column content
    By Nikeo2808 in forum Excel General
    Replies: 1
    Last Post: 02-10-2018, 11:52 AM
  2. Send Emails once expiry date is reached, and generate report based on emails sent
    By demonicscorpion in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2014, 05:36 AM
  3. Macro to send emails based on date
    By timmymckinney in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-21-2014, 02:18 PM
  4. Send emails from a sheet attaching diferent .pdf files
    By Darker0ne in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-08-2014, 08:55 AM
  5. Auto Send Emails Based on Due Date
    By Nuclearman83 in forum Excel General
    Replies: 5
    Last Post: 03-23-2012, 02:54 PM
  6. Send Emails based on cell value
    By kaki1956 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2010, 08:28 PM

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