As Hiroshe said, this isn't anywhere near enough information to start helping you. You'll need to not only explain the assignment, but also show us what you have tried to do already to solve it.
Do not expect us to hand you a solution out of thin air, either. Daniweb is not a free homework solving web site; we won't do your work for you. You will need to demonstrate due diligence on your own part before anyone here will give you assistance. This is even in the rules of the site:
Do provide evidence of having done some work yourself if posting questions from school or work assignments
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...