Private Sub Worksheet_Change(ByVal Target As Range)
Dim Firstday&, p As Range, r As Range, I&, NbJour&, J&
Application.ScreenUpdating = False
Set p = Range("K6,T6,AC6,AL6,AU6,BD6,K15,T15,AC15,AL15,AU15,BD15,K24")
If Target.Address = "$K$2" Then
If Not IsNumeric([K2].Value) Then Exit Sub
Application.EnableEvents = False
For I = 1 To 13
Set r = p.Areas(I).Resize(6, 7) 'determine la plage du mois(i)avec sa cells(1)
r.Value = "": r.NumberFormat = "dd"
Firstday = Weekday(DateSerial([K2], I, 1), vbUseSystemDayOfWeek) - 1 'le jour de la semaine du premier du mois
NbJour = Day(DateSerial([K2], I + 1, 0)) 'le nombre de jour dans le mois
For J = 1 To NbJour
r.Cells(Firstday + (J)) = DateSerial([K2], I, J)
Next
Next
End If
Application.EnableEvents = True
Range("K2").Select
End Sub