LoginSignup
1
5

More than 5 years have passed since last update.

VBA 処理時間の計測

Last updated at Posted at 2018-12-11

VBAの処理時間の計測

使用場面

  • VBAで重たいマクロ処理を作成している際にどれくらい時間が掛かっているのか計測したい場合
  • 処理時間を計測することでどれくらいスピードアップしたのか把握したい場合

使用方法

  • 処理の初めに以下のように記述
  • Bookを開く処理などがあるなら、その前に記述したほうが良い
    Dim StratTime, StopTime As Variant           '// 処理時間計測用
    StartTime = Time
  • 同じ処理の最後に以下のように記述
    StopTime = StopTime - StartTime
    MsgBox "所要時間:" &  Minute(StopTime) & "分" & Second(StopTime) & "秒"
1
5
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
5