Sub Workbook_Open()
For Each c In Range("f10:ar" & [B65000].End(3).Row)
If IsDate(c.Value) Then
If Date < c.Value And Date + 3 >= c.Value Then
tx = tx & Cells(c.Row, 2) & " " & Cells(9, c.Column - 1) & " " & Cells(9, c.Column) & " " & c.Text & vbCr
c.Select
End If
End If
Next
Dim r As Range
Dim msg As String
With SuiviFormations
For Each r In .Range("E10:AL" & .Range("B10").CurrentRegion.Rows.Count)
If IsDate(r.Value) Then
If r.Value >= .[C4].Value And r.Value <= .[C2].Value Then
rx = rx & "Formation : " & .Cells(8, r.Column).MergeArea.Range("A1").Value & " / " & "Nom : " & .Range("B" & r.Row).Value & "/" & "Echéance : " & r.Value & vbCrLf
End If
End If
Next
End With
If tx <> "" Then MsgBox tx, vbInformation Or vbOKOnly, "Formations urgentes"
If rx <> "" Then MsgBox rx, vbInformation Or vbOKOnly, "Formations HS"
End Sub