/ Published in: Visual Basic
Expand |
Embed | Plain Text
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
Comments
Subscribe to comments
You need to login to post a comment.

Function LDoM(ByVal d As Date) As Date Dim tmpDate As Date
End Function