< Public Function DaysInMonth (mMonth As Integer, yYear As Integer) As Integer (?)

Comments

'------------------------------------------------------------------------------ ' Get the number of days in a given month '------------------------------------------------------------------------------

Public Function DaysInMonth (mMonth As Integer, yYear As Integer) As Integer

    'Return the day of the month of the day before the first day of the next month
    DaysInMonth = Day(-1 + DateAdd("m", 1, DateSerial(yYear, mMonth, 1)))
End Function


Copying, Return to index