I can suggest a simpler approach. If you use a single event handler the building part of your textboxes are a lot easier. Then in the common TextChanged event you examine the sender object passed to the handler and use it to call a specific handler for that textbox
So we could have
for i = 0 to 5
Dim TextBoxes As New TextBox
With TextBoxes
.Name = "InputTextBox" & i
.AutoSize = True
.Parent = FlowLayoutPanel1
End With
' Add the common handler for all textboxes
AddHandler TextBoxes.TextChanged, AddressOf onChanged
Next
In the common onChanged event you write this code
Sub onChanged(sender As Object, e As EventArgs)
Dim t As TextBox = CType(sender,TextBox)
Select Case t.Name
case "inputTextBox0"
HandleInputTextBox0()
case "inputTextBox1"
HandleInputTextBox1()
..... and so on....
End Select
End Sub
But we could also get rid of that Select Case if you prepare a Dictionary where each key is the name of your textboxes and each value is the Action to be performed for that box
Dim dict As Dictionary(Of String, Action) = New Dictionary(Of String, Action) From
{
{"inputTextBox0", AddressOf HandleInputTextBox0},
{"inputTextBox1", AddressOf HandleInputTextBox1}
}
and change the common textchanged handler to a simple two lines code
Sub onChanged(sender As Object, e As EventArgs)
Dim t As TextBox = CType(sender,TextBox)
dict(t.Name).Invoke()
End Sub