Hi Henk,
Maybe you could loop through the forms controls collection and test each for
your control name and if true then set the text:
Dim cnl As Control
Dim t As Integer
For Each cnl In Me.Controls
For t = 0 To 2
If cnl.Name = "Text" & t Then
cnl.Text = "Hello" & t
End If
Next
Next
"henk" <ri*******@hotmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi,
I want to change the text of a textbox with a loop like this:
For t = 0 To
txtTest1.text="hello"
txtTest2.text="hello2"
next t
but I want to use the controlname dynamically eg
txtTest+i.text
But wat is the correct syntax for this??
Thanks.