Hardly any code and look mom "No variables":
VB Code:
Function GetMonthDays(MonthToCheck As Date) As Integer GetMonthDays = Day((DateAdd("m", 1, Format(MonthToCheck, "mm/yyyy"))) - 1) End Function
and call it like this:
VB Code:
Private Sub Command1_Click() MsgBox GetMonthDays("02/23/2004") End Sub




Reply With Quote