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

·Q½Ð±Ð-¦b³]©wªº¤é´Á¦Û°Ê°õ¦æ¥¨¶°

¦^´_ 30# basarasy


    ¦]¬°ONTIME¬O¬°±N¨Ó³]©w°õ¦æµ{§Ç
©Ò¥HÀ³¸Ó¥Î±a°Ñ¼Æªºµ{§Ç¨Ó§PÂ_®É¶¡¬O§_¶W¹L
¦bµ{§Çnnªº²Ä¤@¦æµ{§ÇIf Now > T Then Exit Sub
³]¸m¤¤Â_ÂI
°õ¦ætest§Y¥i¤F¸Ñ
  1. Sub test()
  2. mytime = Now
  3. mystr = "'nn " & Chr(34) & mytime & Chr(34) & "'"
  4. Application.OnTime mytime, mystr
  5. End Sub
  6. Sub nn(T As Date)
  7. If Now > T Then Exit Sub
  8. MsgBox "°õ¦æ"
  9. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 30# basarasy
¬O¤£¬O¦p¦¹
  1. Sub Ex()
  2.     If Time > TimeValue("09:00") And Time < TimeValue("13:30") Then
  3.         Application.OnTime Time + TimeValue("00:00:10"), "????"
  4.     End If
  5. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ ¤TÄ_ ©ó 2010-10-21 23:23 ½s¿è

¦^´_ 30# basarasy

§Ú«ö·ÓGBKEEª©¤jªº¼gªk,
´N·|¹F¦¨§Aªº­n¨D°Õ
®É¶¡¨S¨ì¤£·|RUN
®É¶¡¹L¤F¤]¤£·|RUN
À³¸Ó¨S¿ù,§A¦A¸Õ¸Õ¬Ý§a...

TOP

ÁÂÁ¤j¤j.
¦ý§Ú¬O·Q°Ý  
«ü©w®É¶¡(9:00:10)
¦b8:59:59 RUN EX
µ¥¨ì9:00:10  ¦Û°ÊRUN "????"

9:00:11  RUN EX  ¤£·|RUN "????"
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 30# basarasy
¶â,¹ï°Ú,¥Ø«e§Ú¸Õ¤F¬O³o¼Ë¨S¿ù,
¤£¹L­n«ü©w¤é´Á
If Date="2010/10/21"  Then
³o¼Ëªº¸Ü,¥u¦³¦b«ü©w¨º¤@¤Ñªº¨º­Ó®É¶¡¤~·|RUN
¹L¤F¨º­Ó®É¶¡¦ARUN EX,¥¦¤]¤£·|RUN
¥i¬O¨S¦³«ü©w¤é´Áªº¸Ü,¨º¹L¤F¨º­Ó®É¶¡¥¦ÁÙ¬O·|¦ARUN¤@¦¸,
¦]¬°Hsiehª©¤j¼gªºVBA§Ú¬Ý¤£À´,
©Ò¥H§ÚÁÙ¬O¥ÎGBKEEª©¤jªº¤èªk°µ,
¨ì²{¦b¸Õ°_¨Ó¬OOKªº,
§A¸Õ¸Õ¬Ý§a,¦pªG¦³µo²{¤°»ò¦æ¤£³qªº¦a¤è,
¦A³qª¾¤@¤U,
»¡¤£©w§Ú¨Sµo²{¨ì,
ÁÂÁÂ.

TOP

¦^´_ 35# ¤TÄ_
Hsiehª©¥Dªºµ{¦¡½XApplication.OnTime®É©Ò°õ¦æªºµ{§Ç­n¥[¤W¤Þ¼Æ
µ{§Ç¦³¤Þ¼Æ®É ©I¥s¦¹µ{¦¡ ¥²¶·¦bªÅ¤@®æ«á¥[¤W¤Þ¼Æ µ{§Çªº¤Þ¼Æ¦³«ü©w«¬ºA®É ¤Þ¼Æ­n¬O¦P«¬ºA
½Æ»sµ{¦¡½X °õ¦æ¬Ý¬Ý
Sub test()
mytime = Now
mystr = "'nn " & Chr(34) & mytime & Chr(34) & "'"
MsgBox  mystr
Application.OnTime mytime, mystr
End Sub
Sub nn(T As Date)     '¤Þ¼Æ«¬ºA¬O¤é´Á
MsgBox "°õ¦æ®É¶¡"&t
End Sub

TOP

        ÀR«ä¦Û¦b : ª¾ÃÑ­n¥Î¤ßÅé·|¡A¤~¯àÅܦ¨¦Û¤vªº´¼¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD