Showing posts with label Create a Macro To display Birthday Alerts. Show all posts
Showing posts with label Create a Macro To display Birthday Alerts. Show all posts

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

Import data from SQL

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