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

½Ð¦U¦ì¥ý¶iÀ°¦£ §ï§ÚªºVBA

½Ð¦U¦ì¥ý¶iÀ°¦£ §ï§ÚªºVBA

¤§«eªB¤ÍÀ°§Ú¼gªºVBA
¦]¬°¼Æ¾Ú¤@¦³ÅܤƴN·|°O¿ý
©Ò¥H¼Æ¾Ú¦³®É¦h¦³®É¤Ö
§Ú·Q¨C¹j10¬í°O¿ý1¦¸
¦ý¬O§Ú¤S¬Oªù¥~º~
©Ò¥H·Q½Ð¦U¦ì¥ý¶iÀ°À°¦£   ÁÂÁÂ

Private Sub CommandButton1_Click()

End Sub

Private Sub Worksheet_Calculate()

If TimeValue(Format(Now, "hh:mm:ss")) <= TimeValue("08:44:00") Then
  
    Range("A2:J50000") = ""
   
Else

            
If TimeValue(Format(Now, "hh:mm:ss")) >= TimeValue("08:45:00") And TimeValue(Format(Now, "hh:mm:ss")) <= TimeValue("13:45:00") Then
   ar = Array([A1], [B1], [C1], [D1], [E1], [F1], [G1], [H1], [I1], [J1])
   [A65536].End(xlUp).Offset(1, 0).Resize(, 10) = ar
   
End If
End If
End Sub

Worksheet_Calculate()   <==== °ÝÃD¦b³oÃä, dde ¼Æ¾Ú¤@§ïÅÜ´N·|IJµo¤U­±ªºµ{¦¡½X
If TimeValue(Format(Now, "hh:mm:ss")) <= TimeValue("08:44:00") Then
  
    Range("A2:J50000") = ""
   
Else

            
If TimeValue(Format(Now, "hh:mm:ss")) >= TimeValue("08:45:00") And TimeValue(Format(Now, "hh:mm:ss")) <= TimeValue("13:45:00") Then
   ar = Array([A1], [B1], [C1], [D1], [E1], [F1], [G1], [H1], [I1], [J1])
   [A65536].End(xlUp).Offset(1, 0).Resize(, 10) = ar
   
End If
End If


©Ò¥H§A­nªº¶¡®æ®É¶¡µL®Ä
²MªÅ«á, ´N¤£·|¤@ª½¶](©ÎµÛ §A¥i¥H ¦b­ì¥N½X¤¤ ¼W¥[®É¶¡§PÂ_ 10sec,60sec ­n°õ¦æªº¨Æ¶µ)

TOP

¤µ¤Ñ²×©ó¥i¥H¥Î¤F

¤Ó·PÁ±z¤FGBKEE

ÁÙ¦³oobird
¤]­nÁÂÁ±z

TOP

´ú¸Õok

¥i¬O½L¤¤¯uªº¤@¦¸°O¿ý3µ§
§Ú©ú¤Ñ¦A¸Õ¸Õ

ÁÂÁÂGBKEE

TOP

À³¸Ó¤£¬O¿ùı

½Ð¬Ý¤µ¤Ñ°O¿ýªº¹Ï

Noname.png (36.33 KB)

Noname.png

TOP

¦^´_ 26# junsean
¤@¦¸°O¿ý3µ§­«½Æªº¼Æ¾Ú ¤£·|§r! ·|¤£·|¬O§Aªº¼Æ¾Ú¨S¦³Åܰʪº¿ùı.
¤w¥[¤W®É¶¡Äæ,§A²{¦b¨ì23:45:00«e¥i´ú¸Õ¬Ý¬Ý.
   
  1. Sub yy()
  2.     With Sheet1
  3.         If Time <= TimeValue("08:44:50") Then
  4.            .Range("A3:G50000") = ""
  5.            Application.OnTime TimeSerial(8, 45, 0), "yy"
  6.         End If
  7.         If Time >= TimeValue("08:45:00") And Time <= TimeValue("23:45:00") Then
  8.             ar = Array(.[A2], .[B2], .[C2], .[D2], .[E2], .[F2], .[G2], Time)
  9.             .[A65536].End(xlUp).Offset(1, 0).Resize(, 8) = ar
  10.             Application.OnTime Time + TimeSerial(0, 0, 10), "yy"
  11.         End If
  12.     End With
  13. End Sub
  14. Sub xx()
  15.     With Sheet2
  16.         If Time <= TimeValue("08:59:50") Then
  17.             .Range("A3:J50000") = ""
  18.             Application.OnTime TimeSerial(9, 0, 0), "xx"
  19.         End If
  20.         If Time >= TimeValue("09:00:00") And Time <= TimeValue("23:32:10") Then
  21.             ar = Array(.[A2], .[B2], .[C2], .[D2], .[E2], .[F2], .[G2], .[H2], .[I2], .[J2], Time)
  22.             .[A65536].End(xlUp).Offset(1, 0).Resize(, 11) = ar
  23.             Application.OnTime Time + TimeSerial(0, 1, 0), "xx"
  24.         End If
  25.     End With
  26. End Sub
½Æ»s¥N½X

TOP

ªþÀÉ

³Â·Ð±z¤F

¤µ¤Ñ¤j³¡¤À¬O
¤@¦¸°O¿ý3µ§­«½Æªº¼Æ¾Ú

DDE.rar (105.62 KB)

TOP

¦^´_ 24# junsean
ªþÀɨӬݬÝ

TOP

¤µ¤Ñ¸Õ¥Î  ¥i¥H¥Î¤F
¥i¬O¨C¦¸³£°O¿ý3µ§(¦P¼Ëªº¼Æ¾Ú)
¦n©_©Ç
¤£¬O¨C¦¸°O¿ý1µ§¶Ü

½Ð¦U¦ì¤j¤j  À°À°¤p§Ì  ÁÂÁÂ

TOP

·P®¦GBKEE
ÁÙ¦³oobird
ÁÂÁ§A­Ì

TOP

        ÀR«ä¦Û¦b : ¤H­n¦Û·R¡A¤~¯à·R´¶¤Ñ¤Uªº¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD