I have been struggling with this for a bit and not quite sure the best way to go about this. I can go through the controls and get the text in each control and add them to a string.
Code Below Code:
Public Shared CombineBoxVarStr As String Dim sb As New StringBuilder() For Each ctrl As Control In FlowLayoutPanel1.Controls If TypeOf ctrl Is TextBox Then Dim tbox = DirectCast(ctrl, TextBox).Text sb.Append(tbox) End If Next Dim Mystring As [String] Mystring = sb.ToString() CombineBoxVarStr = Mystring
Which works great but the problem is I need the format to be a bit different.
The above code output = A1B2C3
What I need is A=1 B=2 C=3
Any help or suggestions would be great.




Reply With Quote