回复 2楼 xzlxzlxzl
xzlxzlxzl版主 麻烦你写个代码!我下面这个只是执行了顺序循环,要实现每周换个班,循环3周 底周才是第一周的表 还要判断某个时段谁在干啥,有点难,开始想到用VB读取本周是第今年第19周,来判断,那个好像还要难一点。
Option Explicit
Private Sub Form_Load()
Dim startDate
Dim nowDate
Dim interval As Long
Dim dutyMan As Integer
Dim order(0 To 2) As String
order(0) = "【张某】"
order(1) = "【王某】"
order(2) = "【刘某】"
startDate = DateSerial(2018, 5, 8)
nowDate = Date
interval = nowDate - startDate
dutyMan = interval Mod 3
Label1.Caption = "今天是" & Date & ",该" & order(dutyMan) & "值班"
[此贴子已经被作者于2018-5-8 08:37编辑过]