| ©«¤l1018 ¥DÃD15 ºëµØ0 ¿n¤À1058 ÂI¦W0  §@·~¨t²Îwin7 32bit ³nÅ骩¥»Office 2016 64-bit ¾\ŪÅv50 ©Ê§O¨k ¨Ó¦Û®ç¶é µù¥U®É¶¡2012-5-9 ³Ì«áµn¿ý2022-9-28 
 | 
                
| ¦^´_ 3# owen06 
 Application.OnTime t2, "AutoCopy",,false   ³oÓ»yªk¤@ª½¤£ª¾¹D¸Ó«ç»òÀ³¥Î¡C¥i¥Î¥þ°ìÅܼƬö¿ý®É¶¡¡A¥H¨ú®ø¸Ó®É¶¡ªº±Æµ{
 ½Æ»s¥N½XPrivate tNext As Date
Sub StartButton()
  On Error Resume Next
  StopButton
  On Error GoTo 0
  MyLoop TimeValue("18:00:00")
End Sub
Public Sub StopButton()
  Application.OnTime tNext, "MyLoop", , False
End Sub
Sub MyLoop(Optional tStart)
  Const MIN_INTERVAL = 1 '¶¡¹j®É¶¡
  
  If Not IsMissing(tStart) Then
    tNext = tStart
    Application.OnTime tNext, "MyLoop"
  Else
    tNext = tNext + TimeSerial(0, MIN_INTERVAL, 0)
    Application.OnTime tNext, "MyLoop"
    MyCopyFunc 'call your copy function
  End If
End Sub
Sub MyCopyFunc()
  'The timing cost of MyCopyFunc should less than the time of INTERVAL
  'Copy here
End Sub
 | 
 |