Hey guys,
I am having trouble with my form. Everything works correctly as long as there is a number value. If a textbox is blank, then I would get an error. Is there any way to get around this? I don't want the user to have to input the value of 0 in order to sum all the textboxes.
Thanks in advance
This is the code I used
I am having trouble with my form. Everything works correctly as long as there is a number value. If a textbox is blank, then I would get an error. Is there any way to get around this? I don't want the user to have to input the value of 0 in order to sum all the textboxes.
Thanks in advance
This is the code I used
Code:
Private Sub TextBox44_Change()
Me.TextBox44.Value = CDbl(Line1.Value) + CDbl(Line2.Value) + CDbl(Line3.Value) + CDbl(Line4.Value) + CDbl(Line5.Value) + CDbl(Line6a.Value) + CDbl(Line6b.Value) + CDbl(Line7.Value) + CDbl(Line8.Value) + CDbl(Line9a.Value) + CDbl(Line9b.Value) + CDbl(Line9c.Value) + CDbl(Line10.Value) + CDbl(Line11.Value) + CDbl(Line12.Value) + CDbl(Line13.Value) + CDbl(Line14.Value) + CDbl(Line15.Value) + CDbl(Line16.Value) + CDbl(Line17.Value) + CDbl(Line18.Value) + CDbl(Line19.Value) + CDbl(Line20.Value)
End Sub