I have a userfrom with 3 textboxs (textbox1, textbox2, textbox3). I want when the user input a number in text box 1 for textbox2 to = +7 more than textbox1's value and for textbox3 to = -7 less than textbox1's value. I have it working correctly except if there is a number that is typed in wrong in textbox1 and backspace is utilized to erase all the number I get a Runtime error 13 debug message.
For example, if I type 50 in textbox1. Textbox2 = 57 and textbox3 = 43 but when I erase 50 the error pops up
below is my code so far
For example, if I type 50 in textbox1. Textbox2 = 57 and textbox3 = 43 but when I erase 50 the error pops up
below is my code so far
Code:
Private Sub TextBox1_Change()
TextBox2.Value = TextBox1.Value + 7
TextBox3.Value = TextBox1.Value - 7
End Sub