Dim strTimeStart as String
Dim strTimeFinish as String
strTimeStart = Time()
[Insert your vba code here]
strTimeFinish = Time()
MsgBox "Your macro takes " & DateDiff("s", strTimeStart, strTimeFinish) & “ seconds to run!”
With this information you can decide if is better to split the code in two or more macros and insert a status message in the middle, or leave like it is and just inform the users that your macro will take “x” minutes to run…
Knowing exactly the time that your macros takes to run you can take advantage to build better and organize your report(s).
No comments:
Post a Comment