Tuesday, July 26, 2011

Create a Macro To display Birthday Alerts

If you want to display alerts or reminders like employee name abc is having birthday tomorrow, etc.

Here is the code-

' you can add this code in workbook open module.

Sub tests()
Dim i As Long
For i = 2 To Sheets(1).Range("a1").End(xlDown).Row
If Day(CDate(Sheets(1).Range("c" & i).Value)) - Day(Now) = 1 And Month(CDate(Sheets(1).Range("c" & i).Value)) - Month(Now) = 0 Then
MsgBox "Employee Name --> " & Sheets(1).Range("b" & i).Value & " is having b'day tomorrow"
End If
Next i
End Sub

Download Excel Macro File http://www.filefactory.com/file/cc92d19/n/b_day_alerts.xlsm


  1. how do i display the past weekends birthdays as a popup on every monday. im stuck editing it.

    plz help

  2. Hi I would like to make a popup of birthdays that happened the weekend every monday only. how to go about it.

    Plz help

  3. check if today is monday and then in if condition use today + n days to cover a week period

  4. you can also post your query here for quick response


Import data from SQL

Macro to import data from SQL using ADO connection string: Sub Import_data_from_SQL() ' Tools -> References -> Microsoft Active...