D
dinobuiatti
Guest
Let's say I had 5 text boxes named text1, text2, text3......text5. Assuming I wanted to set their values to 1,2,3,4, and 5, I could do the following:
text1.text = "1"
text2.text = "2"
text3.text = "3"
text4.text = "4"
text5.text = "5"
But a better way would be to do it dynamically. Something like:
' declare variables
dim countervalue, textfieldname
' clear variable
countervalue = 1
' for loop
for countervalue = 1 to 5
' create reference to text field
textfieldname = text & countervalue
' set text value for current text field
textfieldname.text = countervalue
Next
Of course in my example, the the text1.text is evaluated as a text instead of a reference to the text field
How can I build a dynamic structure that refers to text fields and other controls.
Thnx
Dino B
text1.text = "1"
text2.text = "2"
text3.text = "3"
text4.text = "4"
text5.text = "5"
But a better way would be to do it dynamically. Something like:
' declare variables
dim countervalue, textfieldname
' clear variable
countervalue = 1
' for loop
for countervalue = 1 to 5
' create reference to text field
textfieldname = text & countervalue
' set text value for current text field
textfieldname.text = countervalue
Next
Of course in my example, the the text1.text is evaluated as a text instead of a reference to the text field
How can I build a dynamic structure that refers to text fields and other controls.
Thnx
Dino B