Dim d As Date = "2019-5-27" Dim n As Integer = 5 Dim x, y As Integer For i As Integer = 0 To n-1 If (d.day+i) Mod n = 0 Then x = i y = (d.day+i) \ n Exit For End If Next msgbox(x) msgbox(y) If x Mod 2 = 0 Then x = x+y msgbox("文本框" & x) Else If y > x Then x = y-x msgbox("文本框" & x) ElseIf x > y Then x = x-y msgbox("文本框" & 13-x) Else msgbox("文本框1") End If End If