Return to Snippet

Revision: 6879
at June 23, 2008 08:44 by corydeppen


Initial Code
Function LastDayOfMonth(MonthNbr As Byte, YearNbr As Integer) As Date
    
    Dim theDay As Byte
    
    For theDay = 1 To 32        
        If Not IsDate(MonthNbr & "/" & theDay & "/" & YearNbr) Then            
            theDay = theDay - 1
            LastDayOfMonth = CDate(MonthNbr & "/" & theDay & "/" & YearNbr)
            Exit Function        
        End If    
    Next theDay
    
End Function

Initial URL

                                

Initial Description

                                

Initial Title
Last Day of the Month

Initial Tags

                                

Initial Language
Visual Basic