ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð±Ð¦¹µ{§Ç¬°¦ó¿ù»~?

²³æªº code ½ÆÂø¤Æ

TOP

Sub timestock()
' Application.EnableEvents = False
    Application.ScreenUpdating = False
If TimeValue(The_Time) > TimeValue(Time) Then    '¹w¨¾ ¤W¤@¦¸ OnTime©|¥¼°õ¦æ,¦A«×°õ¦æ¤@¦¸OnTime
     Exit Sub
End If

' Time     '**** °õ¦æªºOnTime
' The_Time '**** °õ¦æ¤U¤@¦¸OnTime

'------------------------------------------------------------------------------------------
Dim TIMEB, AG
TIMEB = 10
AG = (TimeValue(Now) * 60 * 60 * 24) - (Range("B2") * 60 * 60 * 24) '´«¬°¬í

  If AG > TIMEB Then
  On Error Resume Next
  Application.OnTime The_Time, "timestock", Schedule:=False
  If Err Then
     Application.OnTime The_Time, "timestock", Schedule:=True
  End If

      The_Time = 0
       Range("B2") = TimeValue(Now)
    MsgBox "­«¶]"
timestock
Exit Sub
End If                                                   '   333333
'--------------------------------------------------------------------------------

   
    my = #12:00:01 AM#
The_Time = Time + my
Application.OnTime The_Time, "timestock"
[a2] = [a2] + 1
Range("a1").Value = Format(The_Time, "hh:mm:ss")

End Sub

TOP

        ÀR«ä¦Û¦b : ¦Y­W¤F­W¡B­WºÉ¤Ü¨Ó¡A¨ÉºÖ¤FºÖ¡BºÖºÉ´d¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD