I am trying to write verify the users age for a school project and am having troubles getting the Year(Now()) to actually return the current year.
Private Sub cmdOldEnough_Click()
Dim strCalculateAge As String
Dim dtToday As Date
strCalculateAge = Right(inpAge, 4)
dtToday = Year(Now())
MsgBox dtToday
End Sub
The Current code returns the date 07/08/1905. Many thanks!
You don't need a
Date
, you need aLong
: