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 28 29
|
Private Sub TextBox9_AfterUpdate()
' envoi de la valeur dans la feuille de calcul
Feuil6.Range("C2").Value = Format(Me.TextBox8.Value, "hh:mm")
Feuil6.Range("B2").Value = Format(Me.TextBox9.Value, "hh:mm")
'****************************************************************************************
Me.TextBox10.Value = Feuil6.Range("D2").Value
' format du champ Résultat dans la textbox
Me.TextBox10.Value = Format(Me.TextBox10.Value, "hh:mm")
End Sub
Private Sub TextBox18_AfterUpdate()
If TextBox18.Value = "" Then TextBox18.Value = 0 Else TextBox18.Value = TextBox18.Value
total
End Sub
Private Sub TextBox10_AfterUpdate()
If TextBox10.Value = "" Then TextBox10.Value = 0 Else TextBox10.Value = TextBox10.Value
total
End Sub
Private Sub total()
Const porctge As Single = 100
TextBox13.Text = Format(CDate(TextBox10.Value) - CDate(TextBox18.Value), "hh:mm")
TextBox15.Text = Format(CDate(TextBox10.Value) - CDate(TextBox18.Value), "hh:mm")
TextBox12.Text = (Val(TextBox13.Text) / Val(TextBox18.Value)) * porctge, "0.00%") 'Probleme de format
If Len(TextBox10.Value > TextBox8.Value) Then
TextBox13.ForeColor = RGB(23, 138, 4) 'ici
End If
End Sub |
Partager