I’m creating an XML file with the text fields of a form. When I go through them using a For Each loop:
For each Ctrl in Me.Controls
'dosomething
Next
it doesn’t take them in order; that is, it first takes the TextBox in the middle, then the first one, then another and it keeps going that way.
Is there a way where I can take the values in order?
Me.Controlscontains the controls in the order they were created.To change that, select the first control (in the designer), click Send to Back, and repeat.