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

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

¦^´_ 21# usana642
1. ½Ð±N¤U¦Cµ{¦¡½X½Æ»s¨ì ThisWorkbook ¼Ò²Õ¤º¡A¨Ã¤©Àx¦s¡C
  1. Option Explicit
  2. Dim timerEnabled As Boolean    ' §P©w¶}±Ò¥»¤u§@ªí³æªº®É¬q¬O§_¬°¶}½L«e±Ò°Ê¡C
  3. Dim Pos As Integer             ' ±N¨C¹j "¦h¤Ö®É¶¡" ³B²z®É¬q¡A²¾¨ì¦¹³B¨Ó³B²z¡C

  4. Private Sub Workbook_Open()
  5.     Pos = Sheets("µ¦²¤°O¿ý").Range("B" & Rows.Count).End(xlUp).Row
  6.     If (Pos < 11) Then Pos = 10
  7.     Sheets("µ¦²¤°O¿ý").Cells(4, 2) = Pos

  8.     If (Sheets("µ¦²¤°O¿ý").Range("B6").Value = "") Then Sheets("µ¦²¤°O¿ý").Range("B6").Value = "08:45:00"
  9.     If (Sheets("µ¦²¤°O¿ý").Range("B7").Value = "") Then Sheets("µ¦²¤°O¿ý").Range("B7").Value = "13:45:00"
  10.     If (Sheets("µ¦²¤°O¿ý").Range("B8").Value = "") Then Sheets("µ¦²¤°O¿ý").Range("B8").Value = "00:00:30"
  11.    
  12.     timerEnabled = False

  13.     Call timerStart      ' µ{¦¡¤@±Ò©l¡A«K¥h¦Û°Ê°õ¦æ timerStart
  14. End Sub

  15. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  16.     On Error Resume Next
  17.     Application.OnTime Now + TimeValue("00:00:01"), "ThisWorkbook.Timer", , False
  18.    
  19.     Me.Save
  20. End Sub

  21. Public Sub Timer()
  22.     On Error Resume Next
  23.     If (TimeValue(Now) > Sheets("µ¦²¤°O¿ý").Range("B7").Value) Then Exit Sub
  24.    
  25.     If (TimeValue(Now) >= Sheets("µ¦²¤°O¿ý").Range("B6").Value) Then         ' ¶}½L¡B¦¬½L®É¬q³]©w
  26.         ' ½L¤¤³B²z¡A±N¸ê®Æ¶×¤J¼g¤J¤u§@ªí³æ¤ºÀx¦s¡C

  27.         With Sheets("µ¦²¤°O¿ý")
  28.             .Cells(3, 2) = Time             ' ±N®É¶¡ Show ¦Üµ¦²¤ªº B3 Äæ¦ì

  29.             Pos = Pos + 1                   ' ±NÅܰʦ渹¥[¤@¦æ
  30.             .Cells(4, 2) = Pos

  31.             .Cells(Pos, 1) = Time
  32.             .Cells(Pos, 2).Offset(0).Resize(, 9) = .[B2:J2].Value
  33.         End With
  34.     End If
  35.         
  36.     Call timerStart
  37. End Sub

  38. Sub timerStart()
  39.     If timerEnabled Then
  40.         ' ²Ä¤G¦¸(§t)¥H«á§¡¥H³]©w¤§ "¶¡¹j®É¬q" ¨Ó³B²z°õ¦æ§Çªº§@·~¡C
  41.         Application.OnTime (Now + Sheets("µ¦²¤°O¿ý").Range("B8").Value), "ThisWorkbook.Timer"
  42.     Else
  43.         timerEnabled = True
  44.         
  45.         ' ±N²Ä¤@¦¸±Ò°Ê®É¶¡§ó§ï¬°³]©w "¶}½L®É¶¡"«e¡A¦pªG¶}±Ò Excel ®É¡A¤w¸g¹L¤F³]©w "¶}½L®É¶¡"¡A«h¤@¶i¤J¨t²Î§Yª½±µ¥h°õ¦æ¬ö¿ý§@·~¡C
  46.         If (TimeValue(Now) <= Sheets("µ¦²¤°O¿ý").Range("B6").Value) Then
  47.             Application.OnTime (Sheets("µ¦²¤°O¿ý").Range("B6").Value), "ThisWorkbook.Timer"
  48.         Else
  49.             ' ¨t²Î­è³s¤W DDE ¦Ü¸ê®Æ¶×¤JExcel¤u§@ªí³æ¡A¶·¦³¤@­Ó½w½Ä®É¬q¡A
  50.             ' ³o®É¦pªG°¨¤W¥h§ì¨úDDE¸ê®Æ¡A·|¦³«¬ºA¤£²Åªº¿ù»~°T®§²£¥Í¡A¨Ã¤¤Â_°õ¦æ§Çªº§@·~¡C
  51.             Application.OnTime (Now + TimeValue("00:00:05")), "ThisWorkbook.Timer"
  52.         End If
  53.     End If
  54. End Sub
½Æ»s¥N½X
2. ¤u§@ªí³æ¤º®e¦p¹Ï¡A½Ð°Ñ¦Ò¥¦»Pµ{¦¡½X¶¡ªºÃö«Y¤Î¹B§@¡C

3. ¥H¤W§¹¦¨«á¡A¥ý±N¥»±M®×Àx¦s¨ÃÂ÷¶}¡C
4. ±µ¤U¨Ó¥ý¥´¶}¨é°Ó³nÅé
    (Ä´¦p¡G§A»s§@ªº¤u§@ªí³æ¬O¸ò­þ¤@®a¨é°Ó³s½uªº¡A¦p EasyWin¡BeLeader¡B©Î¨ä¥L¨é°Ó³s½u³nÅé)¡A
    µM«á±Ò°Ê§A»s§@ªº "¦Û°Ê°O¿ý¨C¤ÀÄÁ©e¶R½æ§¡­È"  Excel¡A¨Ã¦P®É³s¤W¨é°Ó³s½u³nÅé¡A´N¤j¥\§i¦¨¤F¡I

§Æ±æ¥¦¯à§U¯q©ó§A¡A¨Ã¯àÀ°§U§A§ó¤W¤@¼h¼Ó¡C

TOP

¦^´_ 23# c_c_lai


    ¦¬¨ì,ÁÂÁ±z¼ö¤ßªº¤À¨É,¯¬±z°]·½ºuºu...
stock

TOP

½Ð±Ðc_c_lai,¥i¥H¶Çµ¹§Ú¦¹ÀɶÜ? thanks  a lot!

TOP

¦^´_ 25# steveyeh168
¨S E-Mail Address ¦p¦ó±Hµ¹§A¡H

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-9-8 20:23 ½s¿è

ÁÂÁÂC_C_lai......
**************
¦A¦¸·PÁÂ~*_*
³o¬O¤½¶}ªº½×¾Â,­Ó¤HªºMail,½Ð¦b­Ó¤H¸ê®Æ¸ÌÅã¥Ü

TOP

ÁÂÁÂC_C_lai......

¦A¦¸·PÁÂ~*_*
steveyeh168 µoªí©ó 2012-9-23 02:35

¦Û°Ê°O¿ý¨C¤ÀÄÁ©e¶R½æ§¡­È.rar (13.96 KB)

TOP

§Ú¬O¤p¾Ç¥Í,¦¬¤£¨ì,¥i¥H³Â·Ð±H¨ìemail «H½c¶Ü?
¦A¦¸·PÁÂ......

TOP

§Ú¬O¤p¾Ç¥Í,¦¬¤£¨ì,¥i¥H³Â·Ð±H¨ìemail «H½c¶Ü?
¦A¦¸·PÁÂ......
steveyeh168 µoªí©ó 2012-9-25 01:39

¤w±H¨ì§A email «H½c¼Æ¤é¤F¡AÃø¹D¨S¦¬«H¶Ü?

TOP

Dear C_C lai:§Ú¨C¤Ñ³£¦³¦¬«H,¦Ó¥B§Ú©Èyahoo·|Âk¬°©U§£«H,ÁÙ¨ì©U§£«H¥ó°Ï¥h¬Ý
                       ³£¨S¦³,¥i¥H³Â·Ð¦A±H¤@¦¸¶Ü? ¥Ì®¦~

TOP

Dear C_C lai:§Ú¨C¤Ñ³£¦³¦¬«H,¦Ó¥B§Ú©Èyahoo·|Âk¬°©U§£«H,ÁÙ¨ì©U§£«H¥ó°Ï¥h¬Ý
                       ³£¨S ...
steveyeh168 µoªí©ó 2012-9-26 16:55

¦Û°Ê°O¿ý¨C¤ÀÄÁ©e¶R½æ§¡­È.rar (¤W¦¸ E-Mail ®É¶¡¡G2012/9/23 (¶g¤é) 6:05 AM)
§A¦^ÂЮɨSÂI«ö "¦^´_Áä" §Ú¬O¦¬¤£¨ìªº¡A
©¯Á«§ÚµL·N¬Ý¨ì¤F§Aªºµo¤å¡C
¦A¦¬¦¬¬Ý¡I

TOP

        ÀR«ä¦Û¦b : ¬O«D·í±Ð¨|¡AÆg¬ü§@ĵ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD