using main() is a waste as it is the same thing as putting it under if __name__ etc. Instructors use it to teach students about functions, and always use the same name so as not to confuse them. For "real programmers" each function has a specific function (makes sense) and has a descriptive name that says something about what the function does. Obviously main() is neither of these. And it is frustrating for debugging a progam when you go to the bottom to see what tests, etc. there are, and then find a main(), which means you now have to search through the program for it instead.
I don't agree with that. I think it is very convenient to have a main function. As soon as the code in if __name__... has more than a few lines of code, it seems logical to encapsulate it in a function or a class. For example this code may have private variables which don't need to become global variables. As this code thickens, additional functions may become necessary. Also this is coherent with other programming languages. Every C programmer will feel at home with a main() function.
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 ...