Just browsing by. Sharp eye there bumsfeld! What you got was most likely an expostulation from your IDE. I started out with a two space indentation on the class and then went to the more traditional four space indentation later in the code. Comes from copy and paste of older and newer code. Some IDEs catch that sloppy coding!
Sorry about that! I have edited my code indentations. It should work for most mortals now!
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 ...