Private Sub txtHeure_Change()
Dim ValtxtHeure#, ValHeureRef#
ValtxtHeure = Evaluate("=Product(" & Chr(34) & txtHeure.Value & Chr(34) & ")")
ValHeureRef = Evaluate("=Product(" & Chr(34) & "05:20" & Chr(34) & ")")
If ValtxtHeure < ValHeureRef Then
txtRefH.Value = Format(ValtxtHeure + Evaluate("=Product(" & Chr(34) & "18:40" & Chr(34) & ")"), "hhmm")
Else
txtRefH.Value = Format(ValtxtHeure - ValHeureRef, "hhmm")
End If
txtRefFinal.Value = txtRefD.Value & txtRefH.Value
End Sub
Private Sub txtHeure_Change()
Dim ValtxtHeure#, ValHeureRef#
ValtxtHeure = Evaluate("=Product(" & Chr(34) & txtHeure.Value & Chr(34) & ")")
ValHeureRef = Evaluate("=Product(" & Chr(34) & "05:20" & Chr(34) & ")")
If ValtxtHeure < ValHeureRef Then
txtRefH.Value = Format(ValtxtHeure + Evaluate("=Product(" & Chr(34) & "18:40" & Chr(34) & ")"), "hhmm")
Else
txtRefH.Value = Format(ValtxtHeure - ValHeureRef, "hhmm")
End If
txtRefFinal.Value = txtRefD.Value & txtRefH.Value
End Sub
????J'avais pas penser à la reconnaissance des codes ASCII.