|
-
May 1st, 2000, 08:44 AM
#1
Thread Starter
Member
I have a couple of Text Box Control Arrays. What I need to do is loop through all of the elements of each array. So what I am doing is using a nested loop. (Each of the 9 arrays has 7 elements.)
What I need to do is use a Select to find out which Array my primary loop is on and then set a variable to the name of the respective Control so that I can continue with the nested loop to loop through each element. I have no problems to this point. Where I get into trouble is making that variable(representing the current control's name) recognized by vb as the control so that i can look at what text that box has in it. I know this sounds confusing but I know there is a way to do it. Here is my code to help with any confusion.
For i = 0 To 8
Select Case i
Case 0
Code = "R" 'R, O, Hw ... T are the names of the control arrays
Case 1
Code = "O"
Case 2
Code = "Hw"
Case 3
Code = "V"
Case 4
Code = "H"
Case 5
Code = "P"
Case 6
Code = "S"
Case 7
Code = "Pl"
Case 8
Code = "T"
End Select
For i = 0 To 6
MsgBox Code.Text 'This is where I want my
'variable 'Code' to be
'recognized as the control
'whose name stores
Next
Next
Thanks for any help.
JK
-
May 1st, 2000, 03:31 PM
#2
Frenzied Member
I haven't got a clue what you are trying to do, but if you delcare "Code" as Object and then:
set code = R 'etc
in the first select does that work?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|