I have another 100 textboxes that each have textbox#_exit scripts.
I was wondering if they can be combined into 1 exit script?
Here's a short example of the scripts:
thanks for taking a look!
I was wondering if they can be combined into 1 exit script?
Here's a short example of the scripts:
Code:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Label95.Caption = CDbl(TextBox1.Value) + CDbl(TextBox2.Value) + CDbl(TextBox3.Value) + CDbl(TextBox4.Value) + CDbl(TextBox5.Value) + CDbl(TextBox6.Value)
End Sub
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Label95.Caption = CDbl(TextBox1.Value) + CDbl(TextBox2.Value) + CDbl(TextBox3.Value) + CDbl(TextBox4.Value) + CDbl(TextBox5.Value) + CDbl(TextBox6.Value)
End Sub
Private Sub TextBox3_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Label95.Caption = CDbl(TextBox1.Value) + CDbl(TextBox2.Value) + CDbl(TextBox3.Value) + CDbl(TextBox4.Value) + CDbl(TextBox5.Value) + CDbl(TextBox6.Value)
End Sub
Private Sub TextBox4_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Label95.Caption = CDbl(TextBox1.Value) + CDbl(TextBox2.Value) + CDbl(TextBox3.Value) + CDbl(TextBox4.Value) + CDbl(TextBox5.Value) + CDbl(TextBox6.Value)
End Sub
Private Sub TextBox5_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Label95.Caption = CDbl(TextBox1.Value) + CDbl(TextBox2.Value) + CDbl(TextBox3.Value) + CDbl(TextBox4.Value) + CDbl(TextBox5.Value) + CDbl(TextBox6.Value)
End Sub
Private Sub TextBox6_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Label95.Caption = CDbl(TextBox1.Value) + CDbl(TextBox2.Value) + CDbl(TextBox3.Value) + CDbl(TextBox4.Value) + CDbl(TextBox5.Value) + CDbl(TextBox6.Value)
End Sub
thanks for taking a look!