Dim TargetDate、StrYear、StrMonth、StrDay Dim StartDate、Strtime TargetDate = Date ' 获取年月日 StrYear = Year (TargetDate) StrMonth = Month (TargetDate) If Len(strMonth)< 2 Then StrMonth = " 0 "&StrMonth End If StrDay = " 01 " ' 开始日期 StartDate = StrYear&StrMonth&StrDay ' 结束日期 Strtime = DateSerial(年(今)、月(今)+ 1、1 - 1 ) の場合 でlen(月(Strtime))< 2 次に StrMonth = " 0 "&ヶ月(Strtime) 終了 の場合 LastDate = 年(Strtime)&StrMonth&デイ( Strtime) MsgBox StartDate&" | "&LastDate