If CDate(Textbox.Value) > Format(Date, "dd/mm/yyyy") Then
MsgBox "Date cannot be in the future. Today is " & Date
If DateSerial(Right$(Textbox1.Value, 4), Mid$(Textbox1.Value, 3, 2), Left$(Textbox1.Value, 2)) > Date Then
MsgBox "Please enter a date earlier than today: " & Date
Exit Sub
Else
'Your Code
End If