Sub Dates Times Class

LeapYearsVerify

Signature (Visual Basic / VBA)

Private Sub LeapYearsVerify()
    ' Print the leap years, according to Microsoft.

    Dim lngYear As Long
    For lngYear = Year(MinDate) To Year(MaxDate)
        If lngYear Mod 100 = 0 Then
            Debug.Print
        End If
        If CLng(DateSerial(lngYear, 3, 1)) - CLng(DateSerial(lngYear, 2, 28)) = 2 Then
            Debug.Print lngYear & " ";
        End If
    Next lngYear
    Debug.Print
End Sub