Hello every one! I have 6 textboxes and the first 5 boxes need to be added together and in the sixth textbox is where the answer will be. My problem is I am using afterupdate and it works fine but only for one textbox. Once I move out of the next textbox it does not add up all 5 textboxes. Here is a sample of the code. I hope someone can help, I know it is something dumb I am doing but I cant figure out.
Code:
Private Sub TextBox6_afterupdate()
If TextBox6.Value <> "" Then
TextBox11.Value = Format(Val(TextBox6.Value) + Val(TextBox7.Value) + Val(TextBox8.Value) + Val(TextBox9.Value) _
+ Val(TextBox10.Value), "$#,##0.00")
End If
TextBox6.Value = FormatCurrency(TextBox6.Value)
End Sub
Private Sub TextBox7_afterupdate()
If TextBox7.Value <> "" Then
TextBox11.Value = Format(Val(TextBox6.Value) + Val(TextBox7.Value) + Val(TextBox8.Value) + Val(TextBox9.Value) _
+ Val(TextBox10.Value), "$#,##0.00")
End If
TextBox7.Value = FormatCurrency(TextBox7.Value)
End Sub