By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,168 Members | 2,598 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,168 IT Pros & Developers. It's quick & easy.

Problems with DTPicker valuechanged event

P: n/a
I have the following:

Private Sub DTPicker1_ValueChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles DTPicker1.ValueChanged

If DateDiff(DateInterval.Day, DTPicker1.Value, Now) 8 Then
MessageBox.Show("The date is longer ago than 8 days ", "",
DTPicker1.Value = Now
Exit Sub
End If
End Sub

When I click a date longer than 8 days ago it works fine. However, if I
click the arrow next to the month, the above routine cycles around and I get
loads of message boxes on my screen. What's happening?

Nov 10 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.