Private Sub Command1_Click()
startDate = CDate("2018-5-8") '早中晚 张刘王
Enddate = CDate(InputBox("请输入日期(yyyy-mm-dd):", "输入框"))
temp = Abs(Enddate - startDate) '于标准日期相差的天数
bz = (temp \ 7) Mod 3 '求周数
Select Case bz
Case 0
Debug.Print Enddate & "【早班:张某】" & "【中班:刘某】" & "【晚班:王某】"
Case 1
Debug.Print Enddate & "【早班:刘某】" & "【中班:王某】" & "【晚班:张某】"
Case 2
Debug.Print Enddate & "【早班:王某】" & "【中班:张某】" & "【晚班:刘某】"
End Select
End Sub