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

[µo°Ý] µ{¦¡¬yµ{±±¨î°ÝÃD

[µo°Ý] µ{¦¡¬yµ{±±¨î°ÝÃD

§Úªº°ÝÃD¦p¤U¹Ï,½Ð±Ð¤j¤jµ{¦¡½X­n¦p¦ó§ó§ï?

³Â·Ð¤j¤jÀ°¦£¸Ñµª,·P®¦ÁÂÁÂ!!
´ú¸Õ.rar (219.81 KB)

¦^´_ 8# GBKEE
·PÁÂG¤j
´ú¸Õ¥i¥Î,­ì¨Ó¤]¦³¦¹Ãþ¼gªk,¨ü¥Î¤F
ÁÂÁÂG¤j¼ö¤ßÀ°¦£!!

TOP

¦^´_ 7# blue2263
¨ä¹ê¹D²z¬O¤@¼Ëªº¡C
§A¤]¥i¥[¤J #9 ¼W¥[ªº³¡¥÷¡C

TOP

¦^´_ 6# blue2263
§A­ì¥»ªºµ{¦¡½X«K·|¦³¦¹°ÝÃD¡A®t§O¬O·í§A²Ä¤@¦¸°õ¦æ
¦Û°Ê°O¿ý() ¤@ª½¨ì If Time > TimeValue(aaTime) Then
®ÆÂ÷«á«K°±¤î¤£¦A°õ¦æ¤F¡C (¥u RUN ²Ä¤@°j½ü¦Ó¤w)¡C
©Ò¥H¦b¨C¤@¬íªºµøı¤W(µe­±·|¤£°±°{Ã{)¦ÛµM·|¦³©Ò¤£¦P¡C
­×¥¿«áªºµ{¦¡¤~¬O¥¿±`¹B§@ªº¹Lµ{¡C(¤TºØ§PÂ_¬Ò¹LÂo)
·íµM¦o·|¤@ª½°õ¦æ¨ì±ø¥óº¡¨¬¬°¤î¡C
¦pªG§A·Q¥O¥¦¯à¤¤³~°±¤î¡A«h»Ý¥[¤J´¡Â_§PÂ_¡C
­×§ï (¤½¥ÎÅܼƼW¥[ stp )
  1. Public uMode&, aTime, bTime, cTime, dTime, eTime, aaTime, bbTime, stp As Boolean
  2. Public MyBook As Workbook, Sht1 As Worksheet, Sht2 As Worksheet, xRow&, §ó·s§PÂ_, xTime

  3. Sub ¶}©l°õ¦æ()
  4.     Dim startOn As Boolean
  5.    
  6.     If stp Then stp = False: Exit Sub    '  ´¡Â_
  7.     Set MyBook = ThisWorkbook
½Æ»s¥N½X
¼W¥[
  1. Sub ´¡Â_()
  2.     stp = True
  3. End Sub
½Æ»s¥N½X
¤u§@ªí¤W¼W¥[¤@ "«ö¶s"  «ü©w¥¨¶°«ü¦V  "´¡Â_()" §Y¥i¡A
ÂI¿ï¥¦«K°±¤î°õ¦æ¡F±µ³o¦A¦¸ÂI¿ï¥¦¡A«K¤SÄ~Äò°õ¦æ¤F¡C

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2016-10-8 16:18 ½s¿è

¦^´_ 7# blue2263
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Public uMode&, xTime(1 To 5)
  3. Public MyBook As Workbook, Sht1 As Worksheet, Sht2 As Worksheet, xRow&, §ó·s§PÂ_
  4. Sub ¶}©l°õ¦æ()
  5.         Set MyBook = ThisWorkbook
  6.         xTime(1) = #3:00:00 AM# '¹q¤l½L ¦¬½L®É¶¡ "03:00:00"
  7.         xTime(2) = #8:44:00 AM# '¦­½L ¶}½L®É¶¡ "08:44:00"
  8.         xTime(3) = #1:45:00 PM# '¦­½L ¦¬½L®É¶¡ "13:45:00"
  9.         xTime(4) = #2:35:00 PM# '¹q¤l½L ¶}½L®É¶¡ "14:35:00"
  10.         If Time <= #11:59:59 AM# Then
  11.             Set Sht1 = MyBook.Sheets("a") '¦­½L
  12.             If Time <= xTime(1) Or Time >= xTime(2) Then
  13.                  If Time <= xTime(1) Then Set Sht1 = MyBook.Sheets("b")                     '¹q¤l½L
  14.                 ³]©w
  15.                 ¦Û°Ê°O¿ý
  16.             Else         '¦­½L
  17.                 xTime(5) = xTime(2) - #12:00:05 AM#
  18.                 Application.OnTime xTime(5), "³]©w"
  19.                 xTime(5) = xTime(2) + #12:00:10 AM#
  20.                 Application.OnTime xTime(5), "¦Û°Ê°O¿ý"
  21.             End If
  22.         Else
  23.             Set Sht1 = MyBook.Sheets("B")  '¹q¤l½L
  24.             If Time <= xTime(3) Or Time >= xTime(4) Then
  25.                 If Time <= xTime(3) Then Set Sht1 = MyBook.Sheets("a") '¦­½L
  26.                 ³]©w
  27.                 ¦Û°Ê°O¿ý
  28.             Else
  29.                 xTime(5) = xTime(4) - #12:00:05 AM#
  30.                 Application.OnTime xTime(5), "³]©w"
  31.                 xTime(5) = xTime(4) + #12:00:10 AM#
  32.                 Application.OnTime xTime(5), "¦Û°Ê°O¿ý"
  33.             End If
  34.         End If
  35. End Sub
  36. Sub ¦Û°Ê°O¿ý()
  37.         Dim Msg As Boolean
  38.        If uMode = 0 Then Exit Sub
  39.         If Time <= #11:59:59 AM# Then
  40.             If Time > xTime(1) And Time < xTime(2) Then
  41.                 Msg = True
  42.                 xTime(5) = xTime(2) - #12:00:05 AM#
  43.                 Application.OnTime xTime(5), "³]©w"
  44.                 xTime(5) = xTime(2) + #12:00:10 AM#
  45.                 Application.OnTime xTime(5), "¦Û°Ê°O¿ý"
  46.                 Application.StatusBar = "¦­½L ¶}½L®É¶¡" & xTime(5)
  47.             End If
  48.         Else
  49.             If Time > xTime(3) And Time < xTime(4) Then
  50.                 Msg = True
  51.                 xTime(5) = xTime(2) - #12:00:05 AM#
  52.                 Application.OnTime xTime(5), "³]©w"
  53.                 xTime(5) = xTime(2) + #12:00:10 AM#
  54.                 Application.OnTime xTime(5), "¦Û°Ê°O¿ý"
  55.                 Application.StatusBar = "¹q¤l½L ¶}½L®É¶¡" & xTime(5)
  56.             End If
  57.         End If
  58.         If Msg Then
  59.            Application.DisplayStatusBar = True  '¥´¶}ª¬ºA¦C¡C
  60.            'Application.StatusBar = "¦¬½L"
  61.            ActiveWorkbook.Save '·í«e¤u§@ªíÀx¦s
  62.            Exit Sub
  63.          End If
  64.         '¨C¤ÀÄÁ°O¿ý----------------------------------------------------------
  65.    '     If Second(Time) = 0 Then
  66.             xRow = Sht1.Range("A8").End(xlDown).Row  '¥Ñ¤W©¹¤U§ä
  67.             Sht1.Range("B1") = xRow + 1
  68.             Sht1.Range("A10").EntireRow.Insert
  69.             Sht1.Range("A10:CZ10").Value = Sht1.Range("A9:CZ9").Value
  70.             Sht1.Range("b10") = Time
  71.    '     End If
  72.         '********¨C¤ÀÄÁ°O¿ý- µe­±¤£·|¤£°±°{Ã{¤F****************
  73.         xTime(5) = TimeSerial(Hour(Time), Minute(Time) + 1, 0)
  74.         Application.OnTime xTime(5), "¦Û°Ê°O¿ý" '¨C¤À»¼°j¤@¦¸
  75. End Sub
  76. Sub ³]©w()
  77.         uMode = 1
  78.         Sht1.Select
  79.         Sht1.Range("a9") = Date '¤é´Á
  80.         Application.DisplayStatusBar = False  'Ãö³¬ª¬ºA¦C¡C
  81. End Sub
  82. Sub ¶}©l()
  83.     ¶}©l°õ¦æ
  84. End Sub
  85. Sub °±¤î°õ¦æ()
  86.     uMode = 0
  87.     Application.DisplayStatusBar = True  '¥´¶}ª¬ºA¦C¡C
  88.     Application.StatusBar = "¤v°±¤î°õ¦æ"
  89.     If Not IsEmpty(xTime(5)) And Time < xTime(5) Then
  90.         Application.OnTime xTime(5), "¦Û°Ê°O¿ý", Schedule:=False  '°±¤î¥¼°õ¦æªº OnTime±Æµ{
  91.     End If
  92. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ blue2263 ©ó 2016-10-8 14:41 ½s¿è

¦^´_ 5# c_c_lai
  1. Sub ¦Û°Ê°O¿ý()
  2.    
  3.         If uMode = 0 Then Exit Sub
  4.         If Time > TimeValue(aaTime) Then  '¦¬½L®É¶¡¥H«á¤£°õ¦æ
  5.            Application.DisplayStatusBar = True  '¥´¶}ª¬ºA¦C¡C
  6.            Application.StatusBar = "¦¬½L"
  7.            'ActiveWorkbook.Save '·í«e¤u§@ªíÀx¦s
  8.            Application.Wait (Now + TimeValue("0:00:10"))  'µ¥«Ýx¬í«á¶i¦æ
  9.            Call ¶}©l°õ¦æ
  10.            Exit Sub
  11.         End If
  12.         '¨C¤ÀÄÁ°O¿ý----------------------------------------------------------
  13.         If Second(Time) = 0 Then
  14.             xRow = Sht1.Range("A8").End(xlDown).Row  '¥Ñ¤W©¹¤U§ä
  15.             Sht1.Range("B1") = xRow + 1
  16.             Sht1.Range("A10").EntireRow.Insert
  17.             Sht1.Range("A10:CZ10").Value = Sht1.Range("A9:CZ9").Value
  18.             Sht1.Range("b10") = Time
  19.         End If
  20.         
  21.         Application.OnTime Now + TimeValue("00:00:01"), "¦Û°Ê°O¿ý"   '¨C¤@¬í»¼°j¤@¦¸

  22. End Sub
½Æ»s¥N½X
C¤j±z¦n
§Ú¼W¥[²Ä9¦Cµ{¦¡½X,¸õ¦^¥Dµ{¦¡«K¥i¥¿±`°õ¦æ
·PÁÂC¤j¼ö¤ßÀ°¦£,ÁÂÁÂ!!

TOP

¦^´_ 5# c_c_lai

´ú¸Õ¬O¥i¥H¶¶§Q¶i¦æ,¤W¤U¤È½Lªº¨C¤À°O¿ý
¤£¹L¥¨¶°§ó§ï«á,¦³´X­Ó©µ¦ùªº¤p°ÝÃD,·Q½Ð±Ð
1.¥¨¶°§ó§ï«á,µe­±·|¤£°±°{Ã{
2.µ{¦¡°õ¦æ«á,¦p·Q°±¤î°õ¦æ,·|µLªk°±¤î

·PÁÂC¤jÀ°¦£,ÁÂÁÂ

TOP

¦^´_ 4# blue2263
¸Õ¸Õ¬Ý
  1. Sub ¶}©l°õ¦æ()
  2.     Dim startOn As Boolean
  3.    
  4.     Set MyBook = ThisWorkbook
  5.     aTime = "08:44:00"  '  ¦­  ½L ¶}½L®É¶¡   "08:44:00"
  6.     bTime = "13:45:05"  '  ¦­  ½L ¦¬½L®É¶¡   "13:45:00"
  7.     cTime = "14:35:00"  '  ¹q¤l½L ¶}½L®É¶¡   "14:35:00"
  8.     dTime = "23:59:50"  '  ¹q¤l½L ´«¤é®É¶¡   "00:00:00"
  9.     eTime = "03:00:05"  '  ¹q¤l½L ¦¬½L®É¶¡   "03:00:00"
  10.     startOn = False
  11.         
  12.     '  µ¥­Ô¦Ü¦­¤W¶}½L , ¦Û°Ê°õ¦æ¥Dµ{¦¡
  13.     If Time > TimeValue("03:00:00") And Time < TimeValue("13:45:00") Then
  14.         startOn = True
  15.         Set Sht1 = MyBook.Sheets("a")
  16.         aaTime = bTime  '  °±¤î°O¿ý®É¶¡ "13:45:00"
  17.         If Time < TimeValue("08:44:00") Then
  18.             Application.StatusBar = "¡°²{¦b©|¥¼¶}½L¡Aµ{¦¡µ¥«Ý¦Ü8:45¶}½L¦Û°Ê°õ¦æ"
  19.             Application.OnTime TimeValue("08:44:05"), "¶}©l"
  20.             Application.OnTime TimeValue("08:44:10"), "¦Û°Ê°O¿ý"
  21.         Else
  22.             Call ¶}©l
  23.             Call ¦Û°Ê°O¿ý
  24.         End If
  25.     End If
  26.    
  27.     '  µ¥­Ô¦Ü¤¤¤È¹q¤l½L , ¶}½L¦Û°Ê°õ¦æ¥Dµ{¦¡
  28.     If Time > TimeValue("13:45:00") And Time < TimeValue("23:59:59") Then
  29.         startOn = True
  30.         Set Sht1 = MyBook.Sheets("b")
  31.         aaTime = dTime  '  °±¤î°O¿ý®É¶¡ "00:00:00"
  32.         If Time < TimeValue("14:34:00") Then
  33.             Application.StatusBar = "¡°²{¦b©|¥¼¶}½L¡Aµ{¦¡µ¥«Ý¦Ü14:35:00¶}½L¦Û°Ê°õ¦æ"
  34.             Application.OnTime TimeValue("14:34:05"), "¶}©l"
  35.             Application.OnTime TimeValue("14:34:10"), "¦Û°Ê°O¿ý"
  36.         Else
  37.             Call ¶}©l
  38.             Call ¦Û°Ê°O¿ý
  39.         End If
  40.     End If
  41.    
  42.     '  µ¥­Ô¦Ü¤¤¤È¹q¤l½L(´«¤é) , ¶}½L¦Û°Ê°õ¦æ¥Dµ{¦¡
  43.     If Time > TimeValue("00:00:01") And Time < TimeValue("03:00:00") Then
  44.         startOn = True
  45.         Set Sht1 = MyBook.Sheets("b")
  46.         aaTime = eTime  '  °±¤î°O¿ý®É¶¡ "03:00:05"
  47.         If Time < TimeValue("00:00:30") Then
  48.             Application.OnTime TimeValue("00:00:30"), "¶}©l"
  49.             Application.OnTime TimeValue("00:00:35"), "¦Û°Ê°O¿ý"
  50.         Else
  51.             Call ¶}©l
  52.             Call ¦Û°Ê°O¿ý
  53.         End If
  54.     End If
  55.    
  56.     If startOn Then Application.OnTime Now + TimeValue("00:00:01"), "¶}©l°õ¦æ"   '  ¨C¤@¬í»¼°j¤@¦¸
  57. End Sub

  58. Sub ¦Û°Ê°O¿ý()
  59.     If uMode = 0 Then Exit Sub
  60.     If Time > TimeValue(aaTime) Then '  ¦¬½L®É¶¡¥H«á¤£°õ¦æ
  61.        Application.DisplayStatusBar = True  '  ¥´¶}ª¬ºA¦C¡C
  62.        Application.StatusBar = "¦¬½L"
  63.        ActiveWorkbook.Save '  ·í«e¤u§@ªíÀx¦s
  64.        Exit Sub
  65.     End If
  66.     '  ¨C¤ÀÄÁ°O¿ý----------------------------------------------------------
  67.     If Second(Time) = 0 Then
  68.         xRow = Sht1.Range("A8").End(xlDown).Row  '  ¥Ñ¤W©¹¤U§ä
  69.         Sht1.Range("B1") = xRow + 1
  70.         Sht1.Range("A10").EntireRow.Insert
  71.         Sht1.Range("A10:CZ10").Value = Sht1.Range("A9:CZ9").Value
  72.         Sht1.Range("b10") = Time
  73.     End If
  74. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ blue2263 ©ó 2016-10-8 07:26 ½s¿è

¦^´_ 2# GBKEE
G¤j±z¦n
¤£¦n·N«ä,¤£·|¸õ¦^¥Dµ{¦¡,ªº°ÝÃDÁÙ¬O¦s¦b?

¤§«e´ú¸Õ®É,§ó§ï¤Fµ{¦¡¤º®e,§Ñ°O§ï¦^¨Ó,½Ð¥H´ú¸Õ­×¥¿2¬d¬Ý,ÁÂÁÂ
´ú¸Õ­×¥¿2.rar (222.58 KB)

ÁÙ½ÐG¤jÀ°¦£¸Ñµª,·P®¦ÁÂÁÂ!!!

TOP

G¤j±z¦n
¤£¦n·N«ä,´ú¸Õ­×¥¿®É§ï¨ì¤@¨Ç¤º®e,¤v§ó§ï¦n¤F
´ú¸Õ­×¥¿2.rar (222.58 KB)

TOP

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD