Hi,
I have a datetimepicker control on my form and when I run the app and select the drop down arrow to pick a date on the datetimepicker control and then try and select a different month, the app starts repeating the
DateTimePicker1_ValueChanged event over and over each time incrementing the month by one each time.
I have tried to run this with the msgbox and without the msgbox and it runs fine without the msgbox, but when adding the msgbox it starts looping when trying to change the month.
Can someone please tell me why this is happening? My code is listed below
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
Dim ws_area As String
ws_area = DateTimePicker1.Value
MsgBox("Is the following date correct " & ws_area)
End Sub
I have a datetimepicker control on my form and when I run the app and select the drop down arrow to pick a date on the datetimepicker control and then try and select a different month, the app starts repeating the
DateTimePicker1_ValueChanged event over and over each time incrementing the month by one each time.
I have tried to run this with the msgbox and without the msgbox and it runs fine without the msgbox, but when adding the msgbox it starts looping when trying to change the month.
Can someone please tell me why this is happening? My code is listed below
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
Dim ws_area As String
ws_area = DateTimePicker1.Value
MsgBox("Is the following date correct " & ws_area)
End Sub