Dim t As Integer Private Sub Command1_Click() Select Case Weekday(Now) Case 1 MsgBox "今周限行" Case 2 t = 1 Case 3 t = 2 Case 4 t = 3 Case 5 t = 4 Case 6 t = 5 Case 7 MsgBox "今周六限行" End Select If Right(Text1.Text, 1) = t Or Right(Text1.Text, 1) = (t + 5) Mod 10 Then MsgBox "今限行" Else MsgBox "今限行" End If End Sub