Read Order When Using Tags on UserForm; Typename

G

gims289

Does anyone know the order in which VBA reads through tags when looping
through all tags of same name? It doesn't seem to follow a logical route
when reading the tags. All the textboxes are on the same userform tab. The
textboxes are in a 4x3 grid with the center column having the text boxes I'm
after here. I have tab stops assigned to the textboxes as well, but it
doesn't follow that order - which I would thought it would. Thanks for your
time.

For Each ctl In RREForm.Controls
If TypeName(ctl) = "TextBox" Then
If ctl.Tag = "Medical Benefit Plan" Then
If ctl.Text <> "" And ctl.Visible = True Then
Cells(NextPlanRow, 3) = ctl.Text
NextPlanRow = NextPlanRow + 1
End If
End If
. . . . other loops . . . . .
Next ctl
 
J

Jacob Skaria

You are right. It list the text boxes in the order in which the control was
placed in the userform.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top