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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| Private Sub TextBox3_AfterUpdate()
Dim Val As String
Val = Replace(Me.TextBox3, ".", ",")
Val = Format(Val, "0.00")
Val = Replace(Val, ",", ".")
Me.TextBox3 = Val
End Sub
Private Sub TextBox3_Change()
'si il n'y a rien dans les textbox on ne calcule pas
If Me.TextBox3.Value = "" Or Me.TextBox4.Value = "" Then
Exit Sub
End If
Label11.Caption = Round(Val(TextBox3.Value) - Val(TextBox4), 2)
LB11 = Label11
LB11 = Format(LB11, "# ##0.00")
Me.Label11 = LB11
End Sub
Private Sub TextBox4_AfterUpdate()
Dim Val As String
Val = Replace(Me.TextBox4, ".", ",")
Val = Format(Val, "0.00")
Val = Replace(Val, ",", ".")
Me.TextBox4 = Val
End Sub
Private Sub TextBox4_Change()
'si il n'y a rien dans les textbox on ne calcule pas
If Me.TextBox3.Value = "" Or Me.TextBox4.Value = "" Then
Exit Sub
End If
Label11.Caption = Round(Val(TextBox3.Value) - Val(TextBox4), 2)
LB11 = Label11
LB11 = Format(LB11, "# ##0.00")
Me.Label11 = LB11
End Sub |
Partager