Private Sub Form_Load()
Me.TimerInterval = 1000
End Sub
Private Sub Form_Timer()
Me.txtDate.Value = Date
Select Case Weekday(Date, vbMonday)
Case 1
Me![txtWeek] = "星期一"
Case 2
Me![txtWeek] = "星期二"
Case 3
Me![txtWeek] = "星期三"
Case 4
Me![txtWeek] = "星期四"
Case 5
Me![txtWeek] = "星期五"
Case 6
With txtWeek
.ForeColor = 255
End With
Me![txtWeek] = "星期六"
Case 7
With txtWeek
.ForeColor = 255
End With
Me![txtWeek] = "星期日"
End Select
Me.txtTime.Value = Now()
End Sub