Hi
I try to sum the whole values for multiple textboxes in another textbox on userform without depend on the commandbutton . I try to put the code in change event into specific textbox but doesn't sum any thing .what I want when add values for any textbox ,then should show summing values in textbox45
Private Sub TextBox35_Change()
For y = 35 To 44
If Me.Controls("TextBox" & y) = vbNullString Then
Me.Controls("TextBox" & y) = ""
End If
Next y
On Error Resume Next
x = CDbl(TextBox35.Text) + CDbl(TextBox36.Text) + CDbl(TextBox37.Value) + CDbl(TextBox38.Value) + CDbl(TextBox39.Value) + CDbl(TextBox40.Value) + CDbl(TextBox41.Value) + CDbl(TextBox42.Value) + CDbl(TextBox43.Value) + CDbl(TextBox44.Value)
TextBox45.Text = x
TextBox45.Text = Format(TextBox45.Text, "#,###.00")
End Sub
and every textbox contains like this
Private Sub TextBox35_AfterUpdate()
TextBox35.Text = Format(TextBox35.Text, "#,###.00")
End Sub
thanks in advance.