1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
   | Function TestDates(pDate1 As Date, pDate2 As Date) As Long
TestDates = DateDiff("d", pDate1, pDate2)
End Function
 
Private Sub pDate1_Change()
If Len(pDate1) = 2 Or Len(pDate1) = 5 Then
pDate1.Text = pDate1.Text & "/"
pDate1.SelStart = Len(pDate1)
pDate1.Text = Format(pDate1.Text, "dd/mm/yyyy")
End If
End Sub
 
Private Sub pDate2_Change()
If Len(pDate2) = 2 Or Len(pDate2) = 5 Then
pDate2.Text = pDate2.Text & "/"
pDate2.SelStart = Len(pDate2)
pDate2.Text = Format(pDate2.Text, "dd/mm/yyyy")
End If
End Sub
 
Merci d'avance | 
Partager