- ©«¤l
- 117
- ¥DÃD
- 34
- ºëµØ
- 0
- ¿n¤À
- 155
- ÂI¦W
- 0
- §@·~¨t²Î
- windows XP
- ³nÅ骩¥»
- OFFICE 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-19
- ³Ì«áµn¿ý
- 2024-8-29
|
¦P®É°õ¦æµ{¦¡?
¦bºô¸ô¤W§ä¨ì¤@Ó¥i¥HÅã¥Ü¦b¤u§@¶ªºp®É¾¹, ·Q¸ò¦Û¤v¼gªºªF¦è¨Ã¦æ, «oµo²{·|¤@ª½¦bp®Éªºµ{¦¡¶], ½Ð°Ý.....³oºØ¤è¦¡¥i¦æ¶Ü?
sub xx
...............
k = Timer / 86400 + 0.001 / 86400
Application.OnTime k, "yy"
................
end sub
p®É¾¹
Public StopIt As Boolean
Public ResetIt As Boolean
Public LastTime
Sub yy()
Dim StartTime, FinishTime, TotalTime, PauseTime
StopIt = False
ResetIt = False
If Range("a18") = 0 Then
StartTime = Timer
PauseTime = 0
LastTime = 0
Else
StartTime = 0
PauseTime = Timer
End If
StartIt:
DoEvents
If StopIt = True Then
LastTime = TotalTime
Exit Sub
Else
FinishTime = Timer
TotalTime = FinishTime - StartTime + LastTime - PauseTime
TTime = TotalTime * 100
Hm = TTime Mod 100
TTime = TTime \ 100
hh = TTime \ 3600
TTime = TTime Mod 3600
MM = TTime \ 60
SS = TTime Mod 60
Range("a18").Value = Format(hh, "00") & ":" & Format(MM, "00") & ":" & Format(SS, "00") & "." & Format(Hm, "00")
If ResetIt = True Then
Range("a18") = Format(0, "00") & ":" & Format(0, "00") & ":" & Format(0, "00") & "." & Format(0, "00")
LastTime = 0
PauseTime = 0
End
End If
GoTo StartIt
End If
End Sub |
|