Hi, I have a form that has a specific textbox named DateBox and I want to restrict the user from entering any date later than 25 November 2013.
Any quick ideas on how to do this?
I have searched quickly but did not manage to find something suitable.
Thanks in advance for any reply.
I have tried something like this but it is not working...
Code:Private Sub Datebox_Change() Dim maxdate As String maxdate = "25/11/2013" If Datebox.Value > maxdate Then MsgBox "You have entered an invalid date" Else Exit Sub End If End Sub




Reply With Quote
Bookmarks