Hi all,
I have a form in visual basic with about 62 textboxes.
On this form is two columns of textboxes. Textbox 61 -62 is a total textbox for each column.
When the user types in digits to 60 textboxes the program must add it up automatically to textbox61/62.
My current coding that I have is:
Private sub Textboxes61.textchanged(byval sender as system.object, byval e as system.eventargs) handles textbox61.textchanged, textbox1.textchanged, (ALL THE WAY TO TEXTBOX30)
Dim textboxes() as textbox = {textbox1.text, textbox2.text, etc...}
Dim d as decimal
Textbox61.text = textboxes.sum(function(tb) if(decimal.tryparse(tb.text, d, 0)).tostring
End sub
This is a long way to do it automatically...
Isn't there a shorter way that I can do this?
For example:
Private sub Textbox61.textchanged(byval sender as system.object, byval e as system.eventargs) handles textbox61.textchanged
Textbox61=textbox1+textbox2+ ....
End sub
Thanks all.