jfackler
Well-known member
Too early or too late, but I cant wrap my brain around this.
I want to do something like the following:
I know I can add each of the coombobox controls to the "Handles" statement, but I have 56 of the comboboxes that I want to handle the same way. Messy code.
Thanks,
Jon
I want to do something like the following:
Code:
Private Sub createcollection()
Dim combocollection As ControlCollection
Dim combo As Control
For Each combo In Me.Controls
If TypeOf combo Is ComboBox Then
combocollection.Add(combo)
End If
Next
End Sub
Private Sub comboIndexChangedHandler(ByVal sender As Object, ByVal e As System.EventArgs) Handles combocollection.selectedindexchanged
fillthetotals()
End Sub
I know I can add each of the coombobox controls to the "Handles" statement, but I have 56 of the comboboxes that I want to handle the same way. Messy code.
Thanks,
Jon