Code:
Dim ADate As Date
Dim AADate As Long
ADate = TextBox1.value
AADate = ADate
If BBDate > 40909 Or BBDate < 39236 Then
MsgBox "Please enter a date between June 3rd 2007 and January 1st 2012 in the second text box"
Exit Sub
End If
Annoyingly, I have a nearly identical function which I copy/pasted to create this, and it works fine.
Thanks in advance.
Last edited: