Ich habe eine UserForm mit 4 Textboxen. Ich möchte gerne das wenn in den Textboxen ein Wert eingegeben wird, das In der 4ten Textbox automatisch immer das Ergebnis angezeigt wird. Also TB1 + TB2+TB3= TB4
Grüße Fred
Option Explicit
Private Sub TextBox1_Change()
berechnung
End Sub
Private Sub TextBox2_Change()
berechnung
End Sub
Private Sub TextBox3_Change()
berechnung
End Sub
Private Sub berechnung()
TextBox4 = 0
If TextBox1 "" And IsNumeric(TextBox1) Then
TextBox4 = CDbl(TextBox4) + CDbl(TextBox1)
End If
If TextBox2 "" And IsNumeric(TextBox2) Then
TextBox4 = CDbl(TextBox4) + CDbl(TextBox2)
End If
If TextBox3 "" And IsNumeric(TextBox3) Then
TextBox4 = CDbl(TextBox4) + CDbl(TextBox3)
End If
End Sub