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
| Option Explicit
'
Dim DD@, S$, I%
Private Sub Text1_Change()
DD@ = Val(Replace(Me.Text1, ",", ".")) - Val(Replace(Me.Text2, ",", ".")) - Val(Replace(Me.Text3, ",", ".")) - Val(Replace(Me.Text4, ",", ".")) - Val(Replace(Me.Text5, ",", "."))
Debug.Print DD@
S$ = Format$(DD@)
S$ = Replace(S$, ",", ".") + "."
I% = InStr(S$, ".")
Me.Text6.Text = Left$(S$, I% - 2) & "0.00"
End Sub
Private Sub Text2_Change()
Call Text1_Change
End Sub
Private Sub Text3_Change()
Call Text1_Change
End Sub
Private Sub Text4_Change()
Call Text1_Change
End Sub
Private Sub Text5_Change()
Call Text1_Change
End Sub |