Hiya,
I've got a form with 50 text controls. The common thing within these controls are their label which are incremented as such: txtOutcome01, txtOutcome02, etc...
I want to be able to double click on any of the 50 text controls and have it run a bit of code specific to those 50 text boxes. I could easily do it for one by simply using the below:
The easy solution would be to create 50 Sub Functions but that is very messy. Excuse the terminology but is there any sort of way of using a generic DoubleClick event that would only apply to the txtOutcome01-50 text controls? Hope that makes sense?
Cheers,
J
I've got a form with 50 text controls. The common thing within these controls are their label which are incremented as such: txtOutcome01, txtOutcome02, etc...
I want to be able to double click on any of the 50 text controls and have it run a bit of code specific to those 50 text boxes. I could easily do it for one by simply using the below:
Code:
Private Sub txtOutcome01_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtOutcome01.DoubleClick
msgbox "blah blah blah"
End Sub
Cheers,
J