I have a DateTimePicker that I want to do something on it's ValueChanged event, but then I want to change the Value back to 'Yesterday's Date' without firing another event.
I've tried RemoveHandler/AddHandler, but it doesn't seem to work.
Private Sub dtpRequest_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtpRequest.ValueChanged
Dim request As String
request = CStr(dtpRequest.Value.Date)
If lbxRequestedDays.Items.Contains(request) = True Then
MsgBox("This day has already been selected.", vbOKOnly, "Attention")
lblDaysOff.Text = lbxRequestedDays.Items.Count.ToString & " days"