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

[µo°Ý] ½Ð±Ð¤@¤U¶]°j°é¦p¦ó¨Ï¥Î¨ä¥LXLS

¥»©«³Ì«á¥Ñ GBKEE ©ó 2010-10-3 14:36 ½s¿è

¦^´_ 10# yanto913
API ¨ç¼Æ§Ú¤£¼ô, ÁÙ¬O¦^¨ì§A¤@¼ÓªºDO  LOOP °j°é¸Õ¸Õ¬Ý,¦ýÁÙ¬O¦³¯ÊÂI ¦pÀx¦s®æ¦³¦b§@¿é¤J°Ê§@,µ{¦¡·|°±¤î
Moduleªºµ{¦¡½X
  1. Dim MyTime As Single, MyStop As Boolean
  2. Private Const PauseTime = (1 / 60) * 2  ' " * 2 " ->  "0.2¬í"
  3. Sub StartAsub()
  4.     MyStop = False
  5.     MyTime = Timer + PauseTime
  6.     Do
  7.         If MyTime <= Timer Then
  8.             MyTime = Timer + PauseTime
  9.             With Workbooks("Book1.xls").Sheets("Sheet1").Range("a1")
  10.                 .Value = .Value + 1
  11.             End With
  12.         End If
  13.         DoEvents
  14.     Loop While MyStop = False
  15. End Sub
  16. Sub StopAsub()
  17.     MyStop = True
  18. End Sub
½Æ»s¥N½X

TOP

1.§Aªº¥N½XÀ³¸Ó®Ú¥»´N¤£¯à¹B¦æ¡A¦]¬°Settimerªº¦^½Õ¨ç¼Æ´N¤£¬O¶H§AªºAsub©MBsub¨º¼Ë¼gªº¡A¨ãÅ骺¬dMSDN¡C
2.¥Ñ©ó¥Î¤FAPI,«Ü®e©ö´N±Y¼ì©Î³´¤J³¬Àôªº¤U³õ¡C
3.³Ì¦nÁÙ¬O¦Ò¼{¥ÎVBAªºonTime¨Ó¼g¡C

TOP

ÁÂÁÂet5323 ¡A§Ú¦A¸Õ¸ÕonTimeªº¤èªk...¦hÁ¡I
YOYO

TOP

        ÀR«ä¦Û¦b : ºw¤ô¦¨ªe¡C²É¦Ì¦¨ÅÚ¡A¤Å»´¤vÆF¡A¤Å¥Hµ½¤p¦Ó¤£¬°¡C
ªð¦^¦Cªí ¤W¤@¥DÃD