1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| '---Recuperation, mise en forme et ajout des dates
DateDebut = Format(DTPicker1.Value, "dd mmmm yyyy")
DateFin = Format(DTPicker2.Value, "dd mmmm yyyy")
DateJour1 = Format(DTPicker1.Value, "dddd dd mmmm yyyy")
DateJour2 = Format(DateAdd("d", 1, DTPicker1.Value), "dddd dd mmmm yyyy")
DateJour3 = Format(DateAdd("d", 2, DTPicker1.Value), "dddd dd mmmm yyyy")
DateJour4 = Format(DateAdd("d", 3, DTPicker1.Value), "dddd dd mmmm yyyy")
DateJour5 = Format(DTPicker2.Value, "dddd dd mmmm yyyy")
Range("C5").Value = DateJour1
If DTPicker1.Value <> DTPicker2.Value Then
Range("E5").Value = DateJour2
If DTPicker2.Value - DTPicker1.Value > 1 Then
Range("G5").Value = DateJour3
If DTPicker2.Value - DTPicker1.Value > 2 Then
Range("I5").Value = DateJour4
If DTPicker2.Value - DTPicker1.Value > 3 Then
Range("K5").Value = DateJour5
End If
End If
End If
End If |