Hi Sarah
You can use this code to do what you want:
Public Sub DOBDiff()
Dim dateDOB As Date
Dim dateToday As Date
Dim lngYears As Long
Dim lngDays As Long
dateDOB = "11/11/61"
dateToday = Date
lngYears = DateDiff("yyyy", dateDOB, dateToday)
If DateSerial(Year(dateDOB) + lngYears, Month(dateDOB), Day(dateDOB)) > _
DateSerial(Year(dateToday), Month(dateToday), Day(dateToday)) Then
lngYears = lngYears - 1
lngDays = DateDiff("d", DateSerial(Year(dateToday) - 1, Month(dateDOB), _
Day(dateDOB)), dateToday)
Else
lngDays = DateDiff("d", DateSerial(Year(dateToday), Month(dateDOB), _
Day(dateDOB)), dateToday)
End If
Debug.Print "Years: " & lngYears, "Days: " & lngDays
End Sub
HTH + Cheers - Peter
(e-mail address removed) (Sarah), said: