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

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

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

Ä~¤W¤@¦¸´£°Ý³]©w®É¶¡¦Û°Ê°õ¦æ¥¨¶°¤§«á,
·PÁª©¥D¤j¤j¹©¤O¬Û§U,¤w¸Ñ¨M¤p§Ìªº°ÝÃD
·Q¦A½Ð±Ð,
¦pªG§Ú·Q¥[¤J"¤é´Á"ªº¸Ü,
¸Ó«ç»ò¼g©O?
´N¬O³]©w:
2010¦~10¤ë19¤é,¦­¤W09:00:00
macro1
³o¼Ë.

ÁÂÁÂ.

¦^´_ 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

¦^´_ 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

ÁÂÁ¤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

¥»©«³Ì«á¥Ñ ¤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

¦^´_ 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

¦^´_ 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

¦^´_ 29# GBKEE


    ¨º»ò½Ð°Ý­n«ü©w®É¶¡¤~run,¤£¨ì®É¶¡©M¹L¤F®É¶¡¤£·|run ¦pªG¼g?
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_  GBKEE
    ½Ð°Ý¤j¤j.
¦pªG®É¶¡¹L¤F¦Arun³£¬O¥i¦æªº.
¥i¥Hset©w¥u¦³¯S©w®É¶¡¤~run¶Ü?
basarasy µoªí©ó 2010-10-21 19:28

Application.OnTime  "«ü©w¯S©wªº®É¶¡","°õ¦æªºµ{¦¡"
"«ü©w¯S©wªº®É¶¡"-> ,¥²¶·¬O°õ¦æ¦¹µ{¦¡½Xªº®É¶¡¤§«á¤~¦æªº.
½Ð¸Ô¬ÝVBAªº»¡©ú

TOP

¦^´_ 26# GBKEE


    ½Ð°Ý¤j¤j.
¦pªG®É¶¡¹L¤F¦Arun³£¬O¥i¦æªº.
¥i¥Hset©w¥u¦³¯S©w®É¶¡¤~run¶Ü?
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD