Private Sub Worksheet_Change(ByVal Target As Range)
Dim Texte As String, Dt As Date, JSm As String, P As Byte, TSpl() As String
If Target.Column <> 1 Then Exit Sub
If VarType(Target.Value) = vbString Then
Texte = Target.Value
TSpl = Split(Replace(Target.Value, ".", ""), " ")
If UBound(TSpl) = 3 Then
JSm = TSpl(0): For P = 1 To 3: TSpl(P - 1) = TSpl(P): Next P: TSpl(3) = ""
Texte = Join(TSpl, " "): End If
On Error Resume Next
Dt = DateValue(Texte): If Err Then Exit Sub
If JSm <> "" And Format(Dt, "jjj") <> JSm Then If MsgBox("""" & JSm & ". " & Texte _
& """ saisi." & vbLf & """" & Format(Dt, "ddd d mmm" & IIf(Format(Dt, "mmm") <> _
Format(Dt, "mmmm"), ".", "") & " yyyy") & """ à assumer ?", _
vbYesNo, "Changement " & Target.Address) = vbNo Then Exit Sub
If Err = 0 Then Target.Value = Dt
End If
End Sub