Dim sText As String
Dim ary As Variant
Dim i As Long
sText = "Before,Now,After"
ary = Split(sText, ",")
For i = LBound(ary) To UBound(ary)
'Me.Controls("txt" & ary(i)).Visible = True

Signature
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
> Is it possible to loop through text, as it would for number? For example:
>
[quoted text clipped - 3 lines]
> ' i.e. Me.Controls("txt" & Text).Visible = True
> Next Text
Rick Rothstein (MVP - VB) - 29 May 2008 23:12 GMT
It can be done this way also...
Dim V As Variant
For Each V In Split("Before,Now,After", ",")
Me.Controls("txt" & V).Visible = True
Next
Rick
> Dim sText As String
> Dim ary As Variant
[quoted text clipped - 13 lines]
>> ' i.e. Me.Controls("txt" & Text).Visible = True
>> Next Text
Sam Kuo - 30 May 2008 01:19 GMT
Hi Bob and Rick
Thanks alot!
> It can be done this way also...
>
[quoted text clipped - 22 lines]
> >> ' i.e. Me.Controls("txt" & Text).Visible = True
> >> Next Text