Link to home
Start Free TrialLog in
Avatar of bramsquad
bramsquadFlag for United States of America

asked on

control name as text

i know this is farily easy, but i dont know what to search for

im wanting to control a bunch of different controls, and i dont want to use a control array...what i want to do is pass the text which will be the name

so something along the lines of

"text1".Text

thanks

~b
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Hans Langer
Hans Langer

Maybe this way,

Dim oControl As Control
   For Each oControl In Me.Controls
     If oControl.Name = "TextBox1" Then
        Exit For
     End If
Next

' oControl is the control that you searching
MsgBox(oControl.Text)
Sorry, That was concurrency :D