Function 月尾(日期 As Date) Dim y, m y = Year(日期) m = Month(日期) 月尾 = DateSerial(y, m + 1, 0) End Function