The comboboxes are added at Design time. I commented out the Handles statement and used the AddHandler statement after the form loaded up. For example:
Code:Private Sub DateTimePicker2_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker2.ValueChanged Becomes Private Sub DateTimePicker2_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) 'Handles DateTimePicker2.ValueChanged
Then I use:
My hope was that I could use the RemoveHandler statemen to control the event handling. Is this wrong?Code:AddHandler DateTimePicker2.ValueChanged, AddressOf DateTimePicker2_ValueChanged
Regardless- I used Paul’s suggestion and it worked fine. Thanks![]()




Reply With Quote