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

½Ð°Ý waitTime »P OnTime ¦³¤°»ò®t²§¡H

½Ð°Ý waitTime »P OnTime ¦³¤°»ò®t²§¡H

Application.OnTime Now + TimeValue("00:00:5"),
Application.Wait waitTime

¾Ç¨ì¤@­Óª¾ÃѤF

TOP

"­«­n¨Æ¶µ  Wait ¤èªk¼È°± Microsoft Excel ªº©Ò¦³§@·~"
³o¥y¸Ü¯»­«­n¡A§Úªº°ÝÃD´N¬O§xÂZ¦b³o¥y¸Ü¤¤¡AÁÂÁªO¥D¡ã

TOP

¦^´_ 2# cji3cj6xu6
¤£¤F¸Ñ¦h¬Ý¤@¤UVBA »¡©ú¥iª¾
  1. OnTime ¤èªk
  2. ½Ð°Ñ¾\®M¥Î¦Ü½d¨Ò¯S©w¦w±Æ¤@­Óµ{§Ç¦b±N¨Óªº¯S©w®É¶¡°õ¦æ (¬J¥i¬°¬Y­Ó¤é´Áªº«ü©w®É¶¡¡A¤]¥i¬°«ü©wªº®É¶¡¤§«á)¡C
  3. ½d¨Ò
  4. ¥»½d¨Ò³]©w 15 ¬í«á°õ¦æ my_Procedure µ{§Ç¡A±q²{¦b¶}©l­p®É¡C
  5. Application.OnTime Now + TimeValue("00:00:15"), "my_Procedure"               

  6. ¥»½d¨Ò³]©w my_Procedure ¦b¤U¤È 5 ÂI¶}©l°õ¦æ¡C
  7. Application.OnTime TimeValue("17:00:00"), "my_Procedure"               

  8. ¥»½d¨Ò¨ú®ø«e¤@­Ó½d¨Ò¹ï OnTime ªº³]©w¡C
  9. Application.OnTime EarliestTime:=TimeValue("17:00:00"), Procedure:="my_Procedure", Schedule:=False
  10. '***********************
  11. Wait ¤èªk
  12. ½Ð°Ñ¾\®M¥Î¦Ü½d¨Ò¯S©w¼È°±°õ¦æ¥¨¶°¡A¨ì¤@¯S©w®É¶¡¥iÄ~Äò°õ¦æ¡C¦pªG¨ì¹F«ü©w®É¶¡¡A«h¶Ç¦^ True¡C
  13. ­«­n¨Æ¶µ  Wait ¤èªk¼È°± Microsoft Excel ªº©Ò¦³§@·~¡A¨Ã¥B Wait °_§@¥Î®É¥i¯à¸T¤î±z¹ï¹q¸£°µ¨ä¥L§@·~¡C¤£¹L¡A­I´º§@·~¦p¦C¦L©M­«·s­pºâ±NÄ~Äò¶i¦æ¡C
  14. expression.Wait(Time)
  15. expression     ¥²¿ï¡C¸Ó¹Bºâ¦¡¶Ç¦^ Application ª«¥ó¡C
  16. Time     ¥²¿ïªº Variant¡C·Q­n¥¨¶°­«·sÄ~Äò°õ¦æªº®É¶¡ÂI¡A¥H Microsoft Excel ¤é´Á®æ¦¡ªí¥Ü¡C
  17. ½d¨Ò
  18. ¦¹½d¨Ò¼È°±¤@­Ó¥¿¦b°õ¦æªº¥¨¶°ª½¨ì¨ì¤µ¤Ñ¤U¤È 6:23®É¡C
  19. Application.Wait "18:23:00"
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

£°¡ãÁÙ¨S¥´§¹¡A
·í°õ¦æwaitTime ®É¡A¦ü¥G§Ú·Q­nµ¥¤@¤U¦A°õ¦æªº«ü¥O¾ã­Ó¶Ã±¼¡A¨Ò¦p§Ú¦b¦¹®É¶¡¤º±qºô¸ô¤W§ìªº¸ê®Æ¦n¹³³£¨S¦³°õ¦æ¡C
µM¦Ó¡AOnTime¡A·|µ¥§Ú¥¿¦b°õ¦æªº³¡¤À§ì§¹¸ê®Æ¤~°õ¦æ¤U­Ó«ü¥O¡C

¤£¾å±o³o¨âªÌ¦³©M®t²§¡AÁÂÁ«ü±Ð¡ã

TOP

        ÀR«ä¦Û¦b : ¥@¤W¦³¨â¥ó¨Æ¤£¯àµ¥¡G¤@¡B§µ¶¶ ¤G¡B¦æµ½¡C
ªð¦^¦Cªí ¤W¤@¥DÃD