How to create notifications in Excel with VBA revisited

We can automate the complete process of creating notifications in Excel with VBA. Let’s say the payment due date of the customer is February 7, 2016 and we wish to create a reminder three days in advance. We first calculate the reminder date and then format the reminder date cells so that we can immediately see which clients need to be reminded about their payments. Also using automated systems we can email the reminder via Outlook, Gmail, Hotmail or Yahoo mail.

Watch the video below and then study the VBA code to learn how to make reminders or notifications in Excel using VBA:

You may like to watch this video on YouTube.

Sub createNotifications()
Dim i As Long, lastrow As Long
lastrow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To lastrow
Cells(i, 3).Value = Cells(i, 2) – 3
If Cells(i, 3) = Date Then
Cells(i, 3).Interior.ColorIndex = 3
Cells(i, 3).Font.ColorIndex = 2
Cells(i, 4).Value = “Send reminder”
Else
Cells(i, 3).Font.ColorIndex = vbBlack
Cells(i, 3).Interior.ColorIndex = 2
Cells(i, 4).Value = “”
End If
Next
End Sub