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

[µo°Ý] µo°Ý : ¦p¦ó³]©w¯à¦b³W©wªº®É¶¡¬ö¿ý¸ê®Æ

¦³¤F¥i¥H¤F~ «D±`·PÁ±z~
¥t¥~¦³¬Ý¨ìºô¤Í»¡­n°±¤U¨Ó¥i¥H¥Î¤U­±³o­Ó»yªk¡A½Ð°Ý¬O­n¥[¨ì­þ¤@¦æ¸Ì­±©O?
If Time <= #1:30:00 PM# Then Application.OnTime t2, "AutoCopy"

TOP

¦^´_ 7# HenryWang123


    À³¸Ó¬O§ä¤£¨ìsheet1ªºÃö«Y¡A§A§â¸Ì­±ªºsheet1³£§ï¦¨sheets("xxx")À³¸Ó´N¦æ¤F¡C(xxx¬°¤u§@ªí¦WºÙ)
    §Ú¨Ï¥Îsheet1¬O¦]¬°¨S¦³§AªºÀɮסA©Ò¥H¥u¯à¥Î¦Û¤v¨Ï¥Îªº±¡¹Ò¤U¥h³]©w¡A
    ¦]¦¹§A¦b¤£¦Pªº±¡ªp¤U¡A´N·|¥X²{¿ù»~¡A§A¥²»Ý­n¦Û¤v¥h­×§ï¤u§@ªí¦WºÙ³o­Ó³¡¥÷¤~¥i¥H¡C

TOP

¯uªº«D±`·PÁ¦U¦ìªº¸Ñµª~Åý§Ú¯à°÷¦³¾÷·|¨ì¤U¤@¨B!!
¥Ø«e«ö°õ¦æ¥H«á¦³¹J¨ì³o­Ó°ÝÃD¡A¦b·Ð½Ð¦U¦ìÀ°¦£¤F!



½Ð°Ý¸Ó¦p¦ó¸Ñ¨M©O?

TOP

¦^´_ 3# owen06
Application.OnTime t2, "AutoCopy",,false   ³o­Ó»yªk¤@ª½¤£ª¾¹D¸Ó«ç»òÀ³¥Î¡C

¥i¥Î¥þ°ìÅܼƬö¿ý®É¶¡¡A¥H¨ú®ø¸Ó®É¶¡ªº±Æµ{
  1. Private tNext As Date

  2. Sub StartButton()
  3.   On Error Resume Next
  4.   StopButton
  5.   On Error GoTo 0

  6.   MyLoop TimeValue("18:00:00")
  7. End Sub

  8. Public Sub StopButton()
  9.   Application.OnTime tNext, "MyLoop", , False
  10. End Sub

  11. Sub MyLoop(Optional tStart)
  12.   Const MIN_INTERVAL = 1 '¶¡¹j®É¶¡
  13.   
  14.   If Not IsMissing(tStart) Then
  15.     tNext = tStart
  16.     Application.OnTime tNext, "MyLoop"
  17.   Else
  18.     tNext = tNext + TimeSerial(0, MIN_INTERVAL, 0)
  19.     Application.OnTime tNext, "MyLoop"
  20.     MyCopyFunc 'call your copy function
  21.   End If
  22. End Sub

  23. Sub MyCopyFunc()
  24.   'The timing cost of MyCopyFunc should less than the time of INTERVAL
  25.   'Copy here
  26. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# GBKEE


    ­ì¨Ó¦bapplication.ontime«e­±³]©w­ÓIF°õ¦æ±ø¥ó´N¦æ¤F¡I·PÁÂGKBEEª©¥D¤@»yÂI¿ô¹Ú¤¤¤H~~~
    ÁÂÁª©¥D¤j¤j~

TOP

¦^´_ 3# owen06


   
§Ú°±¤£¤U¨Ó§r
  1. If Time <= #1:30:00 PM# Then Application.OnTime t2, "AutoCopy"
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# HenryWang123
  
§Ú¬O·|©w®ÉÅý¸ê®Æ©¹¤Ucopy°Õ¡A¥i¬O·ç¤Z~~~§Ú°±¤£¤U¨Ó§r~~~¦³¨S¦³¨ä¥L°ª¤â¯à±Ð¤@¤U«ç»ò³]©w°h³õ¾÷¨î¡AÅý¥L¯à¦b¹w©wªº®É¶¡¹L«á¡A´N¤£¦Acopy¤F¡C
Application.OnTime t2, "AutoCopy",,false   ³o­Ó»yªk¤@ª½¤£ª¾¹D¸Ó«ç»òÀ³¥Î¡C

   ¦bthisworkbook¸Ì¶K¤W
  1. Private Sub Workbook_Open()
  2. T = #10:58:00 AM#
  3. Application.OnTime T, "AutoCopy"
  4. End Sub
½Æ»s¥N½X
µM«á·s¼W¼Ò²Õ¡A¦A¶K¤W
  1. Sub AutoCopy()
  2. t2 = Now + TimeSerial(0, 2, 0)
  3. Sheet1.[b8:i10].Copy
  4. Sheet1.[b65536].End(3).Offset(1, 0).Select
  5. If Sheet1.[b13] = "" Then Sheet1.[b13].Select
  6. Selection.PasteSpecial xlPasteValues
  7. Application.OnTime t2, "AutoCopy"
  8. End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# HenryWang123


    ¦pªG±Ð¾Ç­n¦¬¶O¤]¥i¥H±H«Hµ¹§Ú~ [email protected]

TOP

        ÀR«ä¦Û¦b : ¹ï¤÷¥À­nª¾®¦¡A·P®¦¡B³ø®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD