Consulting

Results 1 to 3 of 3

Thread: Deadline pop up reminder

  1. #1
    VBAX Regular
    Joined
    Jan 2021
    Posts
    65
    Location

    Deadline pop up reminder

    I have excel table with "ordinal number" in first column, "debit date" in second column, "name" in third column and "date of execution" in forth column. Now I would like to have pop up reminder on file opening for every cell if 60 days have elapsed since the "date of the debit" and the "date of execution" is still empty. The pop up message should read "Its been two month since assignment of file number "Ordinal number", check the status of the file"
    I have found several solutions for similar problems online but none suit me. Thank you!

    Here is example file. Test file.xlsm

  2. #2
    Moderator VBAX Master georgiboy's Avatar
    Joined
    Mar 2008
    Location
    Kent, England
    Posts
    1,198
    Location
    Maybe something like the below placed in the 'ThisWorkbook' module:

    Private Sub Workbook_Open()    
        Dim rCell As Range
        Dim cDays As Long
        
        For Each rCell In List1.Range("A2:A" & List1.Range("A" & Rows.Count).End(xlUp).Row).Cells
            cDays = Date - rCell.Offset(, 1)
            If cDays > 59 And rCell.Offset(, 1) <> vbNullString And rCell.Offset(, 3) = vbNullString Then
                MsgBox "Its been two month since assignment of file number: " & rCell.Value & " , check the status of the file"
            End If
        Next rCell
    End Sub
    Click here for a guide on how to add code tags
    Click here for a guide on how to mark a thread as solved
    Click here for a guide on how to upload a file with your post

    Excel 365, Version 2403, Build 17425.20146

  3. #3
    VBAX Regular
    Joined
    Jan 2021
    Posts
    65
    Location
    Quote Originally Posted by georgiboy View Post
    Maybe something like the below placed in the 'ThisWorkbook' module:

    Private Sub Workbook_Open()    
        Dim rCell As Range
        Dim cDays As Long
        
        For Each rCell In List1.Range("A2:A" & List1.Range("A" & Rows.Count).End(xlUp).Row).Cells
            cDays = Date - rCell.Offset(, 1)
            If cDays > 59 And rCell.Offset(, 1) <> vbNullString And rCell.Offset(, 3) = vbNullString Then
                MsgBox "Its been two month since assignment of file number: " & rCell.Value & " , check the status of the file"
            End If
        Next rCell
    End Sub
    Work like a charm Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •