Category: VB function enhancement
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Sun 7th February 2021
Rating: (1 Votes)
Checks to see if a year is a leap-year.
Originally from https://www.kather.net/VisualBasicSource/vbLeapYear.txt
Function IsLeapYear(strYear As String) As Boolean
Dim strDatum As String
If strYear = "" Then Exit Function
strDatum = ("29-2-" & strYear)
If IsDate(strDatum) Then IsLeapYear = True _
Else IsLeapYear = False
End Function