ooitzechyi
04-19-2017, 06:13 PM
Hey guys,
Is there any way to simplify the code for below request?
I have textbox1 to textbox10 AND textbox1A to textbox10A
and I would like to have
labelsum.caption = (textbox1.value/textbox1A.value) + (textbox2.value/textbox2A.value) + (textbox3.value/textbox3A.value)+ (textbox4.value/textbox4A.value) + ... +(textbox10.value/textbox10A.value)
This has no problem if all the textbox are fill up with number.
But what if there are some textbox left empty?
I know I can do in the way that declare If textbox1 <>'' then... for all textbox...
but it's too troublesome...
Is there any way to simplify this?
Thanks~
Is there any way to simplify the code for below request?
I have textbox1 to textbox10 AND textbox1A to textbox10A
and I would like to have
labelsum.caption = (textbox1.value/textbox1A.value) + (textbox2.value/textbox2A.value) + (textbox3.value/textbox3A.value)+ (textbox4.value/textbox4A.value) + ... +(textbox10.value/textbox10A.value)
This has no problem if all the textbox are fill up with number.
But what if there are some textbox left empty?
I know I can do in the way that declare If textbox1 <>'' then... for all textbox...
but it's too troublesome...
Is there any way to simplify this?
Thanks~