仅供参考:Private Sub TimerCNO_Timer() On Error Goto TCNOTerr TimerCNOs.Enabled = False If TimerCNOs.Interval = 2000 Then TimerCNOs.Interval = 30 '未启动 ElseIf TimerCNOs.Interval = 3000 Then TimerCNOs.Interval = 30 '未启动 TimerCNOs.Enabled = True ElseIf TimerCNOs.Interval = 10000 Then TimerCNOs.Enabled = True End If Exit Sub TCNOTerr: Exit Sub End Sub
On Error Goto TCNOTerr
TimerCNOs.Enabled = False
If TimerCNOs.Interval = 2000 Then
TimerCNOs.Interval = 30 '未启动
ElseIf TimerCNOs.Interval = 3000 Then
TimerCNOs.Interval = 30 '未启动
TimerCNOs.Enabled = True
ElseIf TimerCNOs.Interval = 10000 Then
TimerCNOs.Enabled = True
End If
Exit Sub
TCNOTerr:
Exit Sub
End Sub