Quote:
Sub Auto_Open()
Dim AlarmdateMonth As Integer
Dim AlarmdateDay As Integer
Dim Alarmdate As Date
Sheets("Sheet1").Activate
'substitute the actual sheet name in place of "Sheet1" here
Alarmdate = Cells(1, 1)
AlarmdateMonth = Month(Cells(1, 1)) - 1
AlarmdateDay = Day(Cells(1, 1))
' substitue the correct cell reference (row,column) that contains the date in place of 1, 1 in all three variable definitions
If AlarmdateMonth = Month(Now) Then
If AlarmdateDay = Day(Now) Then
MsgBox "Today is one month prior to " & Alarmdate, vbInformation, "Alarm"
End If
End If
End Sub
This is done as Auto_Open() which means it will be checked every time the workbook is opened. There are other "on event" methods that can be used .