Public abf As Date
Public tbme As Date
Sub showtime()
abf = TimeValue("00:00:01")
tbme = Time + abf
Application.OnTime tbme, "showtime"
Sheets("Sheet3").Range("t1").Value = Hour(Now) & ":" & Minute(Now) & ":" & Second(Now)
End Sub
Sub timestop()
Application.OnTime EarliestTime:=tbme, _
Procedure:="showtime", Schedule:=False
End Sub
Private Sub Worksheet_Calculate()
If Format(Now, "hh:mm:ss") = "13:30:34" Then
timestop
End If
end sub作者: huijuang 時間: 2014-3-14 13:48