How to add a specific event handler to a unspecified control? <p>I'm looking to try and create something like the following:</p> <p>If the user leaves the last textbox (for example let's say TextBox8), then a new textbox is created below textbox8 with the name textbox9. I have this part, but how would I make it so that if textbox9 is left, the same events happen, so on and so forth? </p> <pre><code>Private Sub TextBox8_LoseFocus(sender As Object, e As System.EventArgs) Handles TextBox8.LostFocus ' Textbox 9 creation code which then creates the next textbox etc. End Sub </code></pre> <p>If anybody can offer a better way of doing this sort of thing</p>