Find last day of a month - Vb

Find Last Day

Snippet Code


  
Rate this page :
  [ 0 votes]

To find last day of a month

Function Last(Month As Byte, Year As Integer) As Date Dim Day As Byte For Day = 1 To 32 If Not IsDate(Month &"/" &Day &"/" &Year) Then Day = Day - 1 Last = Date(Month &"/" &Day &"/" &Year) Exit Function End If Next Day End Function

Tags


Ask Questions

Ask Question