Private Sub TextBox1_Change()
Résultat
End Sub
Private Sub TextBox2_Change()
Résultat
End Sub
Private Sub TextBox3_Change()
Résultat
End Sub
Private Sub UserForm_Initialize()
Résultat
End Sub
Sub Résultat()
If IsDate(TextBox1) * IsDate(TextBox2) * IsDate(TextBox3) = 0 Then TextBox4 = "": Exit Sub
Dim t1 As Date, t2 As Date, t3 As Date
t1 = CDate(TextBox1): t2 = CDate(TextBox2): t3 = CDate(TextBox3)
If t2 > t3 Then TextBox4 = "": Exit Sub
TextBox4 = Format(IIf(t1 < t2, t2, IIf(t1 < t3, t1, t3)) - t2, "hh:mm")
End Sub