返回列表 上一主題 發帖

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

        靜思自在 : 【時日莫空過】一個人在世間做了多少事,就等於壽命有多長。因此必須與時間競爭,切莫使時日空過。
返回列表 上一主題