C
cgchris99
Guest
I am trying to loop thru all the controls that are in a groupbox. Here is what I am trying. This is my test code for debuggin.
Dim ctl as Control
Dim x as integer
x=form1.instance.GroupBox2.Controls.Count()
For Each ctl in Form1.instance.GroupBox2.Controls
myname=ctl.name
next
x reports back 76
So I would expect the for loop to loop 76 times. It only loops once.
Why is this? I dont know if this helps. But the GroupBox2 is actually on a TabPage also.
Thanks
Dim ctl as Control
Dim x as integer
x=form1.instance.GroupBox2.Controls.Count()
For Each ctl in Form1.instance.GroupBox2.Controls
myname=ctl.name
next
x reports back 76
So I would expect the for loop to loop 76 times. It only loops once.
Why is this? I dont know if this helps. But the GroupBox2 is actually on a TabPage also.
Thanks