floggingmolly
Board Regular
- Joined
- Sep 14, 2019
- Messages
- 167
- Office Version
- 365
- Platform
- Windows
I have a code that gives a pop up message when a certain day is reached in a cell. I am trying to figure out how to do 2 messages based on 2 different dates. For example if the date in cell BD1 is within 5 days of today I have a pop up alerting that a date in my range B:B is within 5 days. Then I want to have a date in cell BE1 that is 3 days from today and a pop up alerting that a date in my range is now within 3 days. Below is the code I am using. It works when a date in range B:B is within 5 days but I am trying to make it so it will give another message if any date in B:B is within 3 days. I hope this makes sense.
Code:
Sub Workbook_open()
Dim r As Long
For r = 2 To 100
If Range("BD1").Value = Range("BB" & r).Value Then
MsgBox "THERE ARE NON-RENEWALS THAT NEED NOTIFIED WITHIN 5 DAYS!!!!"
Exit Sub
End If
Next r
End Sub