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

[¤À¨É] ¦P®É¶]¨â­Óµ{¦¡!

[¤À¨É] ¦P®É¶]¨â­Óµ{¦¡!

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-10-2 12:33 ½s¿è

Module1µ{¦¡½X
  1. Option Explicit
  2. 'API¨ç¼Æ«Å§i
  3. '³]©w­p®É¾¹¨ç¼Æ
  4. Declare Function SetTimer _
  5.     Lib "user32" ( _
  6.         ByVal hWnd As Long, _
  7.         ByVal nIDEvent As Long, _
  8.         ByVal uElapse As Long, _
  9.         ByVal lpTimerFunc As Long) _
  10. As Long
  11. 'µ²¼Æ­p®É¾¹¨ç¼Æ
  12. Declare Function KillTimer _
  13.     Lib "user32" ( _
  14.         ByVal hWnd As Long, _
  15.         ByVal nIDEvent As Long) _
  16. As Long

  17. '¶}©l²Ä¤@­Ó­p®É¾¹
  18. 'EXCELµøµ¡ªºhandle, id³]¬°1, ¨C 0.2¬í°õ¦æ1¦¸Asubµ{§Ç
  19. Sub StartAsub()
  20.     SetTimer Application.hWnd, 1, 200, AddressOf Asub
  21. End Sub
  22. 'µ²§ô²Ä¤@­Ó­p®É¾¹
  23. Sub StopAsub()
  24.     KillTimer Application.hWnd, 1
  25. End Sub

  26. '¶}©l²Ä¤G­Ó­p®É¾¹
  27. 'EXCELµøµ¡ªºhandle, id³]¬°2, ¨C 0.5¬í°õ¦æ1¦¸Bsubµ{§Ç
  28. Sub StartBsub()
  29.     SetTimer Application.hWnd, 2, 500, AddressOf Bsub
  30. End Sub
  31. 'µ²§ô²Ä¤G­Ó­p®É¾¹
  32. Sub StopBsub()
  33.     KillTimer Application.hWnd, 2
  34. End Sub

  35. 'Asub¦b§@¥Î¤u§@ªí¤§A1Àx¦s®æ²Ö¥[1
  36. Sub Asub()
  37. With ActiveSheet.Range("a1")
  38.     .Value = .Value + 1
  39. End With
  40. End Sub
  41. 'Bsub¦b§@¥Î¤u§@ªí¤§B1Àx¦s®æ²Ö¥[1
  42. Sub Bsub()
  43. With ActiveSheet.Range("b1")
  44.     .Value = .Value + 1
  45. End With
  46. End Sub
½Æ»s¥N½X
Sheet1¼Ò²Õµ{¦¡½X
  1. Option Explicit

  2. Private Sub CommandButton1_Click()
  3.     StartAsub
  4. End Sub

  5. Private Sub CommandButton2_Click()
  6.     StopAsub
  7. End Sub

  8. Private Sub CommandButton3_Click()
  9.     StartBsub
  10. End Sub

  11. Private Sub CommandButton4_Click()
  12.     StopBsub
  13. End Sub
½Æ»s¥N½X
crdotlin«e½úªº¤À¨É run2subs3.zip (18.96 KB)

½Ð°Ý°±¤îÁä
«ö¤U«á
¦p¦óÂk¹s??
ÁÂÁÂ!

TOP

Âk¹s­n¥t¥~¤@­ÓÂk¹s°Ê§@
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¤°»ò°Ê§@¡H
§Ú°õ¦æ²Ä¤G¦¸ªº®É­Ô³£·|¸õ¥XExcel.
­É¿ú¤£ÁÙ¡A¤~¬O¤ý¹D

TOP

§¹¥þ¬Ý¤£©ú¥ÕÀY´X¦æ»¡¤°»ò,declare, lib¤ª¤ª.....
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

³o­Ó´N¤£¥Î§â Timer ¸ü¤J¶i¨Ó¤F¡A¹ï§a¡I
­É¿ú¤£ÁÙ¡A¤~¬O¤ý¹D

TOP

¦^´_ 5# FAlonso
µ{¦¡½X¤w¸gµù¸Ñ»¡©ú
¨º¬OAPI¨ç¼Æ«Å§i


¦Ü©óÂk¹s¡A¥u»Ý¤À§O²MªÅA1¤ÎB1Àx¦s®æ§Y¥i¡A¨ÃµL¯S§O§Þ¥©
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¤£¦n·N«ä,¤£¼ô±xapi
§Ú«ç¼Ëª¾¹D¬Y­Óapi¬OÄݩ󨺭Ólibrary©Îdll,¤¤¶¡¦³´X¦h­Óvariables,¸Óvariables§ÎºA¬°¦ó?
³o¨ÇªF¦è¦ü¥G¤£¬OofficeªºªF¦è,À³¸Ó¦p¦ó·j´M...?
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 8# FAlonso


    google¤j¯«¯àÀ°§A
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 9# Hsieh

§V¤O¾Ç²ß¤¤

TOP

        ÀR«ä¦Û¦b : «Î¼e¤£¦p¤ß¼e¡C
ªð¦^¦Cªí ¤W¤@¥DÃD