+ Reply to Thread
Results 1 to 10 of 10

Email to one email address when a due date is close

  1. #1
    Registered User
    Join Date
    05-30-2012
    Location
    Mississauga, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    12

    Question Email to one email address when a due date is close

    Hello all: This is my first post as so far I have always been able to find what I need, but this time I have not been able to find something that works for me.

    I have attached a test file that I have been working with. Basically it's a temporary employee tracking sheet. What I would like the sheet to do is to email out a notification to one set email address when a temporary employee is 2 weeks from their planned end date (If known). I am not sure how to do this. I would like for it to run in the background but I realize that is not possible when the file is not open. So I wish for this Macro/VBA to run every time the file is opened.

    Thanks in advance

    G.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Email to one email address when a due date is close

    hi,
    welcome!
    I attached yr test file, see if it helps you!
    I added a column for email addresses and another one for "Sent at:"
    if the end date = pc date +15 an email is generated, is this what you're looking for?
    Attached Files Attached Files
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Registered User
    Join Date
    05-30-2012
    Location
    Mississauga, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Email to one email address when a due date is close

    John55 - Thanks so much for your prompt response. I have (with my limited VB code knowledge) modified the script a bit for my purposes. The attached updated files works perfectly when the Command Button is clicked. What I have been trying to do with this is have the script run when the files opens and not by a manual click of the command button.

    Is there a fix for this?

    Thanks,

    G.

    Temp_test_a.xlsm

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Email to one email address when a due date is close

    I just copy/paste the code in
    Please Login or Register  to view this content.
    and when you open it the code works for you!
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Email to one email address when a due date is close

    if you don't want to have it colored in red, you can delete these lines
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-30-2012
    Location
    Mississauga, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Email to one email address when a due date is close

    John55, ahh I see what you did, you moved the code from a VB to a Macro???

    So far it seems to work perfectly!!!!

    Thanks so much!

  7. #7
    Registered User
    Join Date
    05-30-2012
    Location
    Mississauga, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Email to one email address when a due date is close

    Quick question, if the file is not opened every day is it possible that a email will not be sent? So I guess my question should be, if there is no text in the 'send' cell box and it is less than 10 days, will the macro sill send an email?

  8. #8
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Email to one email address when a due date is close

    nope, you need to open the file...let's say daily, otherwise the email(s) won'be generated.

  9. #9
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Email to one email address when a due date is close

    Easy way to do that (open file every day).. is to let Windows Task Scheduler take care of it for you..

    http://social.technet.microsoft.com/...w7itprogeneral

  10. #10
    Registered User
    Join Date
    05-30-2012
    Location
    Mississauga, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Email to one email address when a due date is close

    Thanks APO - I have just set this task up and this should work great! Thanks all.

+ 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] Extracting email chain email address and converting to Excel column
    By Leah_Hael in forum Excel General
    Replies: 4
    Last Post: 12-28-2012, 04:05 PM
  2. Macro to PDF a sheet in workbook and email (outlook) to an email address in a cell
    By paul_sykes00 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-17-2012, 12:54 AM
  3. Replies: 1
    Last Post: 03-08-2012, 01:57 PM
  4. Macro doesn't automatically resolve All email address when email is drafted
    By sonny.thind in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-23-2011, 12:58 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