kevinc1973
New Member
- Joined
- Jun 20, 2019
- Messages
- 22
Hello all,
I am calculating multiple text boxes on a user form and the code i am using seems to be working out okay. The problem i'm having is if I tab into the text boxes that have the code to multiply and divide are left blank are giving me a error message. Some days I may leave those text boxes blank because of no data. How do I go around this so those text boxes stay blank.
If I don't enter into the text boxes it works but i can't guarantee no one else will not tab into the text boxes and get the error message, as there will be multiple people using the user form. thanks for any help
I am calculating multiple text boxes on a user form and the code i am using seems to be working out okay. The problem i'm having is if I tab into the text boxes that have the code to multiply and divide are left blank are giving me a error message. Some days I may leave those text boxes blank because of no data. How do I go around this so those text boxes stay blank.
HTML:
Private Sub textbox4_enter()
TextBox4.value = (TextBox2.value - TextBox3.value)
End Sub
Private Sub TextBox8_Enter()
TextBox8.value = (TextBox2.value - TextBox7.value)
End Sub
Private Sub TextBox9_Enter()
TextBox9.value = ((TextBox8.value * 100)) / (TextBox4.value)
End Sub]
If I don't enter into the text boxes it works but i can't guarantee no one else will not tab into the text boxes and get the error message, as there will be multiple people using the user form. thanks for any help