"Does anyone have a routine/module to calculate the last day of a given month?"

Function LastDayOfMonth(TheTestDate As Date) As Date
    LastDayOfMonth = DateAdd("d", -1, DateAdd("m", 1, DateSerial(Year(TheTestDate), Month(TheTestDate), 1)))
End Function