[CODE]
Public Function IsGregYear(ByVal xYear As Long) As Boolean
  If Not Fix(xYear / 400&) = 0& Then IsGregYear = True
  If Not Fix((xYear Mod 400&) / 100&) = 0& Then IsGregYear = False
  If Not Fix((xYear Mod 100&) / 4&) = 0& Then IsGregYear = True
  If Not xYear Mod 4& = 0& Then IsGregYear = False
  End Function