Private Sub Worksheet_Activate()
Dim c As Range
txt = ""
txt1 = ""
With Sheets("Feuil1")
For Each c In Range(.[P3], [P65536].End(xlUp))
If c <> "" Then
On Error Resume Next
If c.Value < Date Then
If txt = "" Then txt = "xxxxxxxx" & vbCrLf & vbCrLf
txt = txt & c.Offset(, -14) & " xxxxxx " & c.Offset(, 0) & vbCrLf
ElseIf c.Value < Date + 5 Then
If txt1 = "" Then txtl = "xxxxxxxx" & vbCrLf & vbCrLf
txt1 = txt1 & c.Offset(, -14) & " xxxxx " & c.Offset(, 0) & vbCrLf
End If
End If
Next c
If txt <> "" Then MsgBox txt, vbCritical, "xxxxx"
If txt1 <> "" Then MsgBox txt1, vbInformation, "xxxxx"
End With
End Sub