For a leap year function, this should workCode:Private Sub Form_Load() MsgBox "2008 = " & IsLeapYear(2008) MsgBox "2009 = " & IsLeapYear(2009) End Sub Private Function IsLeapYear(ByVal iYear As Integer) As Boolean Dim strDate As String strDate = "February 29, " & iYear IsLeapYear = IsDate(strDate) End Function




Reply With Quote