I have a form that has 5 text boxes. The calculation is working fine but when I erase my numbers to nothing in textbox 2, I get a "run time error 11" and states "division by zero". Anyone help me out here?
Code:
Private Sub TextBox2_Change()
TextBox5 = Val(TextBox1) / Val(TextBox2) * Val(TextBox3)
TextBox4 = Val(TextBox3) - Val(TextBox5)
End Sub