+ Reply to Thread
Results 1 to 4 of 4

Send email containing rows 14 days before expiration due date

  1. #1
    Forum Contributor
    Join Date
    01-20-2022
    Location
    London
    MS-Off Ver
    2010
    Posts
    101

    Send email containing rows 14 days before expiration due date

    Hey all,

    I have found the code below somewhere else and tried to adapt it with no success...
    Beside the error I get here
    Please Login or Register  to view this content.
    I believe the issues are several...

    I have attached a sample sheet if someone can help I would greatly appreciate it!

    Basically I would have this macro called every Monday with a code that I already have as part of the workbook_open sub.
    I want the code below to look in column E for every date within the next 14 days of today's date (6th to the 20th January 2023)
    For example in the sample sheet it would be those employees with due date in column E from 12/01/2023 to the 20/01/2023.
    Once found copy those rows (A:G) and send via email.
    Also the code below should place a "Sent" in column F so that the email doesn't get sent again.

    Eventually I will have two other separate codes doing the same for the 60 days (column H) and 90 days (column K) expiration dates...
    P.S the tables changes as rows are added and deleted and there are a few formulas in it.

    Thanks in advance!

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: Send email containing rows 14 days before expiration due date

    Fix this line into:

    Please Login or Register  to view this content.
    Please check attached file, I've made some minor changes and results are as below:
    Capture.JPG
    Attached Files Attached Files
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    01-20-2022
    Location
    London
    MS-Off Ver
    2010
    Posts
    101
    That’s brilliant! Thanks man.

    Would it be a pain to modify the code so that it also send in the same email the rows with the same matching criteria (14 days) in column H and K?
    But in doing so (although in the same email) can these be separated and therefore three separate tables?
    Thanks again 😊

  4. #4
    Forum Contributor
    Join Date
    01-20-2022
    Location
    London
    MS-Off Ver
    2010
    Posts
    101

    Re: Send email containing rows 14 days before expiration due date

    Also I would I center the text alignment in the table?

    I've tried to add text-align:center ; but it doesn't work...


    Please Login or Register  to view this content.

+ 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. Adding Expiration Date and Days Left For Expiration Problem
    By Newmord in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2018, 09:37 AM
  2. Send email reminder when there are 31 days before a date.
    By U.Ali in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-17-2017, 08:44 PM
  3. Replies: 4
    Last Post: 12-24-2015, 12:02 PM
  4. Use Hyperlink to send email 6 months before expiration date
    By mcivli65 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-28-2015, 01:24 PM
  5. VBA to send email 30 days before due date
    By tekken in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-28-2013, 09:22 AM
  6. Replies: 1
    Last Post: 09-09-2013, 03:46 PM
  7. auto search for expiration date and send email to users
    By mingchu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-08-2013, 06:07 PM

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