A
Andy G
I want to loop through a set of text boxes three at a time (5 rows of 3).
I'm getting object required error on the lines that are like fa1.Name =
"txt" & CStr(box1).
Text box names:
1st run - txt11, txt12, txt13
2nd run - txt21, txt22, txt23
3rd run - txt31, txt32, txt33
4th run- txt41, txt42, txt43
5th run - txt51, txt52, txt53
Any suggestions?
box1 = 1
box2 = 2
box3 = 3
Do Until cnt = 5
Dim fa1, fa2, fa3 As TextBox
Dim cnt, box1, box2, box3 As Integer
box1 = box1 + 10
box2 = box2 + 10
box3 = box3 + 10
fa1.Name = "txt" & CStr(box1)
fa2.Name = "txt" & CStr(box2)
fa3.Name = "txt" & CStr(box3)
'I do stuff here refering to the dynamic names text boxes
cnt = cnt + 1
Loop
I'm getting object required error on the lines that are like fa1.Name =
"txt" & CStr(box1).
Text box names:
1st run - txt11, txt12, txt13
2nd run - txt21, txt22, txt23
3rd run - txt31, txt32, txt33
4th run- txt41, txt42, txt43
5th run - txt51, txt52, txt53
Any suggestions?
box1 = 1
box2 = 2
box3 = 3
Do Until cnt = 5
Dim fa1, fa2, fa3 As TextBox
Dim cnt, box1, box2, box3 As Integer
box1 = box1 + 10
box2 = box2 + 10
box3 = box3 + 10
fa1.Name = "txt" & CStr(box1)
fa2.Name = "txt" & CStr(box2)
fa3.Name = "txt" & CStr(box3)
'I do stuff here refering to the dynamic names text boxes
cnt = cnt + 1
Loop