I have about 20 labels on a form.
I have some more code that does two different things:
First, you will need to know that i have a textbox that goes along with each label and what is entered in that textbox is a number.
So, the code first decides if the number is less than 100, if it is then it just puts that number in the label and also if it is less than 100 it will put a number in ( ) after the number in the label depending on what that number was, example: if the number was 50 in the textbox, in the label it would put "50 (123456)"
The other thing the code will do is if the number is more than 100, if it is then it will do some code like if that number was between 1111 and 2222 then it would put a certain number in the label and in the ( ) put what was in the text box, example: if the number in the textbox was 123456, in the label it would put "50 (123456)"
Now my problem is, i can do all of what i need to do, but since i have around 20 different labels to do this for, it would be tons of code, so is there a way to somehow first use a code for one label, then like loop it and for the number label use the same code?
I have some more code that does two different things:
First, you will need to know that i have a textbox that goes along with each label and what is entered in that textbox is a number.
So, the code first decides if the number is less than 100, if it is then it just puts that number in the label and also if it is less than 100 it will put a number in ( ) after the number in the label depending on what that number was, example: if the number was 50 in the textbox, in the label it would put "50 (123456)"
The other thing the code will do is if the number is more than 100, if it is then it will do some code like if that number was between 1111 and 2222 then it would put a certain number in the label and in the ( ) put what was in the text box, example: if the number in the textbox was 123456, in the label it would put "50 (123456)"
Now my problem is, i can do all of what i need to do, but since i have around 20 different labels to do this for, it would be tons of code, so is there a way to somehow first use a code for one label, then like loop it and for the number label use the same code?