What application could the For Loop be used on? When could this be useful in a program? How could the for loop be used when looping through a collection of controls?
Printable View
What application could the For Loop be used on? When could this be useful in a program? How could the for loop be used when looping through a collection of controls?
If the Control dosn't have a Parent, then you can do:Quote:
Originally posted by wmosley2
How could the for loop be used when looping through a collection of controls?
VB Code:
Dim ctl As Control For Each ctl In Controls If TypeOf ctl Is TextBox Then MsgBox ctl.Name End If Next
i remeber that exact question from CompSci 1n2 this we will not do your HW for u should should be able to figure this out on your own theres a million and 1 way that a for loop is use full