|
こんにちは。
よく解ってませんけど。
Public WWTime As Variant
Sub オンタイム()
If IsEmpty(WWTime) = False Then
On Error Resume Next
Application.OnTime EarliestTime:=TimeValue(WWTime), Procedure:="オンタイム" _
, Schedule:=False
On Error GoTo 0
End If
WWTime = Now() + TimeValue("0:00:05")
Range("A65536").End(xlUp).Offset(1).Value = Format(WWTime, "hh.mm.ss")
DoEvents
Application.OnTime EarliestTime:=WWTime, Procedure:="オンタイム"
End Sub
Sub リセット()
On Error Resume Next
Application.OnTime EarliestTime:=TimeValue(WWTime), Procedure:="オンタイム" _
, Schedule:=False
Err.Clear
On Error GoTo 0
End Sub
|
|