That is a long way. What I'm asking is if there is any shorter or smarter way of doing that just on the "if" statement. If we are talking about a big project with many textboxes checking try/catch with each field is very cumbersome. For instance I tried "??" as coalesce but did not help. So I'm looking for a short cut method.
it seems there is no way of escaping from preparing the "if" statement with many elements in arith. op. So you havet to check textboxes with other"if"s before coming to the final "if" where you execute your actual test. Too much code !! So back to square one...
thank you all
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 ...