返回列表 上一主題 發帖

VBA timer

VBA timer

分享

Timer-Counter.rar (13.12 KB)
sonny1.gif
  1. Sub Start_Timer()
  2.     Application.OnTime Now + TimeValue("00:00:01"), "Increment_count"
  3. End Sub

  4. Sub Increment_count()
  5.     Range("A3").Value = Range("A3").Value + 1
  6.     Start_Timer
  7. End Sub

  8. Sub Stop_Timer()
  9.     Application.OnTime Now + TimeValue("00:00:01"), "Increment_count", schedule:=False
  10. End Sub
複製代碼
ss

        靜思自在 : 自己害自己,莫過於亂發脾氣。
返回列表 上一主題