I think you've not learnt the basics yet... First the value of LHS expression is evaluated and then it is assigned to the variable on RHS... So, first X+20 (50) is evaluated & then it (50) is assigned to X. The procedure simply results in incrementing the value of X by 20. Other values remain unchanged.
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 ...