codice:
' Questa funzione controlla se un anno è bisestile;
Public Function Bisestile(intYear As Integer) As Boolean
    Bisestile = False
    ' 1 Un anno è bisestile se divisibile per 4
    If (intYear Mod 4) = 0 Then
        Bisestile = True
    End If
    ' 2 Non è divisibile però se divisibile per 100
    If (intYear Mod 100) = 0 Then
        Bisestile = False
    End If
    ' 3 è però divisibile per 400
    If (intYear Mod 400) = 0 Then
        Bisestile = True
    End If
End Function