Public Function 先月初日() As Date
Dim 先月 As Date
Let 先月 = DateSerial(Year(Now), Month(Now), 1) - 1
先月初日 = DateSerial(Year(先月), Month(先月), 1)
End Function
Public Function 先月末日() As Date
Dim 初日 As Date
先月末日 = DateSerial(Year(Now), Month(Now), 1) - 1
End Function
Public Function 今月初日() As Date
今月初日 = DateSerial(Year(Now), Month(Now), 1)
End Function
Public Function 今月末日() As Date
Dim 来月 As Date
Let 来月 = DateSerial(Year(Now), Month(Now), 1) + 31
今月末日 = DateSerial(Year(来月), Month(来月), 1) - 1
End Function