Arrays and text boxes

MattCollins

Registered User.
Local time
Today, 01:54
Joined
Aug 12, 2005
Messages
49
Is there anyway to name text boxes in an array format?

i.e. Text(1,23)

Or if not is there anyway to use VB to cycle through the text boxes

i.e
i = 1
Loop until i = 25
Text(i) = codehere
i = i + 1
Exit Loop

Matt
 
Are there any other controls on the form? If not you could loop through the Controls collection of the form.
 
There are other controls on the form unfortunately.
 
Create the text fields you wish to loop through i.e.

txtFieldName_1
txtFieldName_2
txtFieldName_3
txtFieldName_4
etc

i = 1
Loop until i = 25
me(“txtFieldName_” & i) = codehere
i = i + 1
Exit Loop
 

Users who are viewing this thread

Back
Top Bottom