try this, see if you see the message box "last day is sunday"
If DatePart("w", DateSerial(Year(Date), Month(Date) + 1, 0)) = 1 Then
msgbox "Last day is Sunday"
'find the Friday before the end of the month
If DateSerial(Year(Date), Month(Date) + 1, 0) - 2 = Date Then
MsgBox ("Today is the last day of month dont forget to do complete your End of Month Tasks")
End If
Else
If DateSerial(Year(Date), Month(Date) + 1, 0) = Date Then
MsgBox ("Today is the last day of month dont forget to do complete your End of Month Tasks")
End If
End If