Public Function olderAge(ByVal alder As String, ByVal bursdag As Date, ByVal regDato As Date) Dim newAge As Integer Dim nextYear As Date = regDato.AddYears(1) ' MsgBox(Date.Compare(regDato, bursdag)) If regDato.Month > bursdag.Month Then If Now.Year > regDato.Year Then newAge = alder + 1 Else newAge = alder End If Else newAge = alder End If Return newAge End Function