Private Sub Workbook_Open()
Dim w As Worksheet, c As Range, x As String
For Each w In Worksheets
Set c = w.Cells.Find("PLANNING", , xlValues)
If Not c Is Nothing Then
x = "1/" & Trim(Replace(UCase(c), "PLANNING", ""))
If IsDate(x) Then If Month(x) < Month(Date) Then w.Protect "toto" Else w.Unprotect "toto" 'mot de passe toto à adapter
End If
Next
Me.Saved = True 'évite l'invite à la fermeture si aucune modification
End Sub