ashleyuk1984
10-14-2014, 06:50 AM
I've retrieved a small piece of code from a different website.
It basically calculates how long your macro takes to run.
Dim time1 As Double, time2 As Double
time1 = Timer
' <your macro here>
time2 = Timer
MsgBox Format(time2 - time1, "0.00 \s\ec")
The problem is, this only shows seconds. So, instead of showing "1 min 20 secs", it will show "80 secs".
Of course, it's not a huge problem. It would be nice to show (maybe hours) minutes and seconds though.
I need to show how much time saving I've created. So instead of watching the clock lol, I've decided to use this instead.
Thank You.
It basically calculates how long your macro takes to run.
Dim time1 As Double, time2 As Double
time1 = Timer
' <your macro here>
time2 = Timer
MsgBox Format(time2 - time1, "0.00 \s\ec")
The problem is, this only shows seconds. So, instead of showing "1 min 20 secs", it will show "80 secs".
Of course, it's not a huge problem. It would be nice to show (maybe hours) minutes and seconds though.
I need to show how much time saving I've created. So instead of watching the clock lol, I've decided to use this instead.
Thank You.