VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Leap Year Check


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

Rate Leap Year Check

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

Download this snippet    Add to My Saved Code

Leap Year Check Comments

No comments have been posted about Leap Year Check. Why not be the first to post a comment about Leap Year Check.

Post your comment

Subject:
Message:
0/1000 characters