Get text of Textbox into an List using For/Next Loop

Let's say I have 3 textboxes, textbox 1, textbox 2 and textbox 3

Is there a way to setup a for loop to loop thru those 3 and copy each's text value to a List of the same number?

Say in Visual Basic, something like

For x = 1 to 3
MYArray(x) = Textbox(x).Text
Next x

I thought at first that was what Any Textbox was, with the component as the number, but I was wrong.

Thank you.

See screen2 of
lists.aia (16.6 KB)

1 Like

Thank you can't wait to look at it after work today.

Looks good, adapted to my app. I can now get Text value of a textbox by looking at its Index in the List.

Next question: How do I update the Text in a Textbox by referencing its Index in the List? Is that possible?

Using a variable to catch the result, select the textbox in the list of textboxes by index.

Take a block to update the .Text of a text box, and right click it to make it generic (or get it from the All Textboxes section of the Blocks pallette).
Use that block against the variable holding the text box component.

Sample app: