Thanks for taking the time to respond. Very enlightening.
Thank you. I hadn't thought of doing that.
When I tried your example in my IDE, S always evaluated to "" in the locals window.
The msgbox always showed when equal values were compared, including LenB (S) = 0 vs vbNullString or ""
I also tried it with Not and with <>. What one would expect to be equal always displayed the msgbox
and S always evaluated to "".
I have no clue why the difference.
If I understand correctly, declaring strings in languages .Net and on, is done more precisely. I can see how the question might get more complicated.
Of course it may be that my Locals window doesn't know how to say vbNullString.
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 ...