/ Published in: Visual Basic
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
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
                    Subscribe to comments
                
                