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

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

¥»©«³Ì«á¥Ñ GBKEE ©ó 2010-10-19 21:45 ½s¿è

¦^´_ 10# junsean
If Time <= TimeValue("08:59:00") Then   
      Range("A3:I50000") = ""                  '²Ä¤@¦¸±ø¥ó¦¨¥ß®É°õ¦æ ¦p¦¹
ElseIf  Time >= TimeValue("09:00:00") And Time <= TimeValue("13:32:30") Then   
          ar = Array([A2], [B2], [C2], [D2], [E2], [F2], [G2], [H2], [I2])  '¥u¦³9­Ó¤¸¯À  
          [A65536].End(xlUp).Offset(1, 0).Resize(, 10) = ar
          Application.OnTime Time + TimeSerial(0, 0, 10), "yy"       '³o¸Ì´N¤£°õ¦æ¤F
End If
  1. Sub yy()
  2.     With Sheet1
  3.         If Time <= TimeValue("08:59:00") Then
  4.            .Range("A3:I50000") = ""
  5.            Application.OnTime TimeSerial(9, 0, 0), "yy"
  6.         End If
  7.         If Time >= TimeValue("09:00:00") And Time <= TimeValue("13:32:30") Then
  8.             ar = Array(.[A2], .[B2], .[C2], .[D2], .[E2], .[F2], .[G2], .[H2], .[I2],.[J2])
  9.             .[A65536].End(xlUp).Offset(1, 0).Resize(, 10) = 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:44:00") Then
  17.             .Range("A3:J50000") = ""
  18.             Application.OnTime TimeSerial(9, 0, 0), "xx"
  19.         End If
  20.         If Time >= TimeValue("08:45:00") And Time <= TimeValue("13:45:00") Then
  21.             ar = Array(.[A2], .[B2], .[C2], .[D2], .[E2], .[F2], .[G2])
  22.             .[A65536].End(xlUp).Offset(1, 0).Resize(, 7) = ar
  23.             Application.OnTime Time + TimeSerial(0, 1, 0), "xx"
  24.         End If
  25.     End With
  26. End Sub
½Æ»s¥N½X

TOP

ÁÂÁÂGBKEE
§Ú©ú¤Ñ¸Õ¸Õ¬Ý

¥t¥~
¤@©w­n©ñ¦bmodule¶Ü ?

TOP

¦^´_ 12# junsean
¦p¤£¬O¦b¼Ò²Õ »Ý«ü©ú¥X³B
Application.OnTime TimeSerial(9, 0, 0), "SHEET1.yy"
Application.OnTime TimeSerial(9, 0, 0), "SHEET2.XX"

TOP

¥i¥H10¬í°O¿ý¤@¦¸¤F
¥i¬O«ç»ò¨S«öF5¤£·|¦Û°Ê°õ¦æ

¦]¬°§Ú
´Á³f¨C10¬í°O¿ý¤@¦¸
¥[Åv¨C1¤ÀÄÁ°O¿ý¤@¦¸

¥h¬Ý¥[Åv®É³£¨S°O¿ý
¤~«öF5´N¶}©l°O¿ý

¦n©_©Ç

TOP

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

TOP

Ãö±¼excel¤S¦Û°Ê¶}
¤@ª½³£Ãö¤£±¼

TOP

Ãö±¼excel¤S¦Û°Ê¶} ¤@ª½³£Ãö¤£±¼
junsean µoªí©ó 2010-10-20 09:58

Ãö±¼¾ã­Ó Excel µ{¦¡ APPLICATION.ONTIME ¤~·|°±¤î

TOP

¥i¥H
sheet1¼g¤@­Óµ{¦¡½X
sheet2¼g¤@­Óµ{¦¡½X?
¦]¬°§Ú³Ì¦­¬O³o¼Ë¥Îªº

dde.rar (7.29 KB)

dde

TOP

§ÚªºÀÉ®×

dde_old.rar (6.53 KB)

TOP

¦^´_ 18# junsean
¦A¥[¤W Sub AUTO_OPEN() ¦sÀÉ«á ¨C¦¸¦A¶}±Ò´N¥i¥H
  1. Sub AUTO_OPEN()
  2.     yy
  3.     xx
  4. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¡i»X½ªªº¦Û¥Ñ¡j¤H±`¦b¤°»ò³£¥i¥H¦Û¥Ñ¦Û¦bªº®É­Ô¡A«o³Q³oºØÀH¤ß©Ò±ýªº¦Û¥Ñ»X½ª¡AµêÂY®É¥ú¦Ó²@µLıª¾¡C
ªð¦^¦Cªí ¤W¤@¥DÃD