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

½Ð°Ý°ª¤â­n±N¥H¤UDDE ¨C¤ÀÄÁ°O¿ý§ï¬°30¬í¦Û°Ê°O¿ý¤@¦¸­n«ç§ï

¦^´_ 120# areskevin
§A³]¤F¤@­Ó Public Sub Timer() ªº¼Ò²Õªº¶}©l¡A
«o¨S¦³¼Ò²Õªºµ²§ô (End Sub)¡A©Ò¥H·|²£¥Í°õ¦æ¤§¿ù»~¡C
§¹¾ãªº¼Ò²ÕÀ³¬°¡G
  1. Public Sub Timer()
  2.     Dim Pos, i, HHMM As Integer, RangeStr As String
  3.         
  4.     On Error Resume Next
  5.     Sheets("¨C¤À°O¿ý").Cells(2, 4) = Time
  6.    
  7.     HHMM = Hour(Time) * 100 + Minute(Time)
  8.     If (HHMM < 900 Or HHMM > 1333) Then Exit Sub
  9.         
  10.     With Sheets("¨C¤À°O¿ý")
  11.         .Cells(2, 2) = .Cells(2, 2) + 1
  12.         Pos = .Cells(2, 2)
  13.         .Cells(Pos, 1) = Time
  14.         .Cells(Pos, 2) = .Cells(2, 2)
  15.         .Cells(Pos, 3) = .Cells(2, 3)
  16.     End With
  17.    
  18.     Application.OnTime Now + TimeValue(LastMin), "ThisWorkbook.Timer"
  19. End Sub
½Æ»s¥N½X
¦ý¬O§Ú¹ê¦b¬Ý¤£À´ With Sheets("¨C¤À°O¿ý") ùØÀY
¨s³º¦b´y­z¬Æ»ò¡A·Q­n°µ¬Æ»ò¡C
¦]¬° .Cells(2, 2) ¤º®e¹ê»Ú¤W«üªº¬O "=(¤º¥~½L!D35)"¡C

TOP

¦^´_ 120# areskevin
¸Õ¸Õ¬Ý¬O§_¬O§Aªº´£°Ý¡G
  1. Public Sub Timer()
  2.     Dim Pos As Long, HHMM As Integer
  3.         
  4.     With Sheets("¨C¤À°O¿ý")
  5.         HHMM = Hour(Now) * 100 + Minute(Now)
  6.         If (HHMM < 900 Or HHMM > 1333) Then Exit Sub
  7.    
  8.         .Cells(2, 4) = Now
  9.         Pos = .Range("A" & Rows.Count).End(xlUp).Row + 1
  10.         .Cells(Pos, 1) = Format(.Cells(2, 4), "HH:MM:SS")
  11.         .Cells(Pos, 2) = .Cells(2, 2)
  12.         .Cells(Pos, 3) = .Cells(2, 3)
  13.     End With
  14.    
  15.     '  Application.OnTime Now + TimeValue(LastMin), "ThisWorkbook.Timer"
  16.     Application.OnTime Now + TimeValue("00:01:00"), "ThisWorkbook.Timer"
  17. End Sub
½Æ»s¥N½X

TOP

¦^´_ 120# areskevin
¥[¤J¦Û°Ê§PÂ_½s¦C¤é´Á¤§¹ïÀ³¼g¤J¡A
¨Ñ§A´ú¸Õ°Ñ¦Ò¡G
¨C¤À°O¿ý2.rar (15.64 KB)

TOP

¦^´_ 120# areskevin
  1. Public Sub Timer()
  2.     Dim Pos As Long, HHMM As Integer, col As Variant
  3.         
  4.     With Sheets("¨C¤À°O¿ý")
  5.         HHMM = Hour(Now) * 100 + Minute(Now)
  6.         If (HHMM < 900 Or HHMM > 1333) Then Exit Sub
  7.    
  8.         .Cells(2, 4) = Now
  9.         '  Time    6/21    6/21    6/22    6/22    6/23    6/23    6/24    6/24    6/25    6/25
  10.         Set col = Range(.Range("A5"), .Cells(5, .[A5].End(xlToRight).Column)).Find(Format(.Cells(2, 4), "M/D"), LookIn:=xlValues, LookAt:=xlWhole)
  11.         Pos = .Range("A" & Rows.Count).End(xlUp).Row + 1
  12.         .Cells(Pos, 1) = Format(.Cells(2, 4), "HH:MM:SS")
  13.         .Cells(Pos, col.Column) = .Cells(2, 2)
  14.         .Cells(Pos, col.Column + 1) = .Cells(2, 3)
  15.     End With
  16.    
  17.     '  Application.OnTime Now + TimeValue(LastMin), "ThisWorkbook.Timer"
  18.     Application.OnTime Now + TimeValue("00:01:00"), "ThisWorkbook.Timer"
  19. End Sub
½Æ»s¥N½X

TOP

¦^´_ 120# areskevin
¬°¤FÅý§A¯à¹ê»ÚÁA¸Ñ "¨C¤À°O¿ý" ªº¹ê°È¼¶¼g¡A
°µ¤F¦¹À³¥Î½d¨Ò¡A´£¨Ñ§A±o¥H¥þ½L©úÁA
¦p¦ó¥h¹ê»Ú±±¨î¨C¤ë¨C¤éªº¯u¹ê¾Þ½L¬ö¿ý¼g¤J
¨Ã¦A§A­ì¥»ªººc·Q¦Ó¾ã²z¥X¨Ó¤§µ{¦¡¹ê»Ú
À³¥Î½d¨Ò¡A§Æ±æ§AÂǦ¹¯àÁ|¤@¤Ï¤T¥[¥Hµo´§¡C
  1. Public Sub Timer()
  2.     Dim Pos As Long, HHMM As Integer, col As Variant
  3.         
  4.     With Sheets("¨C¤À°O¿ý")
  5.         HHMM = Hour(Now) * 100 + Minute(Now)
  6.         If (HHMM < 900 Or HHMM > 1333) Then Exit Sub
  7.    
  8.         .Cells(2, 4) = Now
  9.         '  Set col = Range(.Range("A5"), .Cells(5, .[A5].End(xlToRight).Column)).Find(Format(.Cells(2, 4), "M/D"), LookIn:=xlValues, LookAt:=xlWhole)
  10.         '  Sheets("¨C¤À°O¿ý").[A4].End(xlToRight).Column = 15 : Variant/Long
  11.         '  Sheets("¨C¤À°O¿ý").[A5].End(xlToRight).Column =  2 : Variant/Long  (¦X¨ÖÀx¦s®æ©ö³y¦¨ End(xlToRight).Column §PÂ_¿ù»~)
  12.         Set col = Range(.Range("A5"), .Cells(5, .[A4].End(xlToRight).Column)).Find(Format(.Cells(2, 4), "M/D"), LookIn:=xlValues, LookAt:=xlWhole)
  13.         Pos = .Cells(Rows.Count, col.Column - 1).End(xlUp).Row + 1    '  §¡¥H¨ä¬Û¹ïÀ³¤§·í¤é (col) ¬°°ò·Ç  
  14.         '  Pos = .Range("A" & Rows.Count).End(xlUp).Row + 1
  15.         .Cells(Pos, col.Column - 1) = Format(.Cells(2, 4), "HH:MM:SS")
  16.         .Cells(Pos, col.Column) = .Cells(2, 2)
  17.         .Cells(Pos, col.Column + 1) = .Cells(2, 3)
  18.     End With
  19.    
  20.     '  Application.OnTime Now + TimeValue(LastMin), "ThisWorkbook.Timer"
  21.     Application.OnTime Now + TimeValue("00:01:00"), "ThisWorkbook.Timer"
  22. End Sub
½Æ»s¥N½X

TOP

´£¨Ñ°Ñ¦Ò¡G
¨C¤À°O¿ý(¨C¤ë).rar (11.91 KB)

TOP

¦^´_ 126# c_c_lai

c_c_lai¤j±z¦n^^
­è­è¹Á¸Õ¤F¤@¤U
§âµ{§Ç¥[¤J
ÁÙ¬OµLªk¸õ°Ê
½Ð°Ý¦pªG¬Û¦P»yªk¼g¤J¦b2013ªºexcel¤]¥i¥H¶Ü¡H
¥t¥~¦]¬°§ÚµLªk¤U¸üªþ¥ó¡A
¯à§_³Â·Ð±z§âªþ¥ó±H°eµ¹§Ú©O¡H
[email protected]
§Æ±æ¦³´Â¤@¤é¯à¸òc_c_lai¤j¤@¼Ë
¯à¦^´_¥L¤Hªº°ÝÃD
¸U¤À·PÁÂ

TOP

¦^´_ 127# areskevin
  1. Option Explicit

  2. Dim LastMin As String

  3. Private Sub Workbook_Open()
  4.     LastMin = "00:01:00"
  5.     Call Timer
  6. End Sub

  7. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  8.     On Error Resume Next
  9.     Application.OnTime Now + TimeValue("00:00:01"), "ThisWorkbook.Timer", , False
  10. End Sub

  11. Public Sub Timer()
  12.     Dim Pos As Long, HHMM As Integer, col As Variant
  13.         
  14.     With Sheets("¨C¤À°O¿ý")
  15.         HHMM = Hour(Now) * 100 + Minute(Now)
  16.         If (HHMM < 900 Or HHMM > 1333) Then Exit Sub
  17.    
  18.         .Cells(2, 4) = Now
  19.         Set col = Range(.Range("A5"), .Cells(5, .[A4].End(xlToRight).Column)).Find(Format(.Cells(2, 4), "M/D"), LookIn:=xlValues, LookAt:=xlWhole)
  20.         Pos = .Cells(Rows.Count, col.Column - 1).End(xlUp).Row + 1       '  §¡¥H¨ä¬Û¹ïÀ³¤§·í¤é (col) ¬°°ò·Ç   (Pos = 6 : Long)
  21.         '  Pos = .Range("A" & Rows.Count).End(xlUp).Row + 1
  22.         .Cells(Pos, col.Column - 1) = Format(.Cells(2, 4), "HH:MM:SS")
  23.         .Cells(Pos, col.Column) = .Cells(2, 2)
  24.         .Cells(Pos, col.Column + 1) = .Cells(2, 3)
  25.     End With
  26.    
  27.     Application.OnTime Now + TimeValue(LastMin), "ThisWorkbook.Timer"
  28.     '  Application.OnTime Now + TimeValue("00:01:00"), "ThisWorkbook.Timer"
  29. End Sub
½Æ»s¥N½X
¦¬¦¬ Mail¡I

TOP

¤Ó´Î©Ô  ³o¸Ì²×©ó§ä¨ì§Ú­nªºªF¦è »Å®@:D
¤p¯Î

TOP

·Q½Ð°Ý¦pªG·Q­n¤@¶}½L´N¥ý§â¬Q¤Ñ¨C30¬í°O¿ýªº¸ê®Æ²¾°£,À³¸Ó­n¦A¸É¤W«ç¼Ëªºµ{¦¡½X©O??

¥t¥~,·Q½Ð°Ý¤@¤U,¦³¨Ç·Qª¾¹Dªº¸ê°T¦pªGÃÒ¨÷°Ó¨S¦³¨º­Ó«~¶µªº¥N½X¬O¤£¬O´NµLªk¨ú±o©O?
Ä´¦p:¤j½Lªºº¦¶^®a¼Æ..etc.

TOP

        ÀR«ä¦Û¦b : ­ì½Ì§O¤H´N¬Oµ½«Ý¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD