获取某个月的最后一天:
Public Function GetLastDateOfMonth(mYear As Integer, mMonth As Integer) As String On Error Resume Next GetLastDateOfMonth = Format(DateAdd("d", -1, DateAdd("m", 1, CDate(mYear & "-" & mMonth & "-1"))), DF_) End Function