This seems pretty straighforward. I have two DateTimePickers. One for a start date and the other for an end date.

I want to check when each one has changed to ensure that the dates are consistent (ie. end date is greater than start date).

This is the code I have so far.

Code:
      Private Sub dtp_SchTaskEnd_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dtp_SchTaskEnd.ValueChanged
        Dim dtp As DateTimePicker = DirectCast(sender, DateTimePicker)
        If dtp.Value.ToShortDateString < Me.dtp_SchTaskStart.Value.ToShortDateString Then
            MessageBox.Show("End date cannot be earlier than start date", "Wrong end date", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
            dtp.Value = Me.dtp_SchTaskStart.Value
        End If
    End Sub
However, the warning message gets shown twice if the If condition is true. Why is that?