msg box with finished time, please read

G

Guest

Try something like:

Sub MsgTimer()
Dim StartTime As Single
Dim EndTime As Single
StartTime = Timer
'Your code here
EndTime = Timer
MsgBox "Time taken: " & EndTime - StartTime & " seconds"
End Sub

Regards
Rowan
 
G

Greegan

What I want to do is show that the macros I've been working on actually
saves time at work, but I want to know how much time.
I would like to have the finished time appear in a msg box with an okay to
close
I'm not sure how to add a msg box let alone the start time, end time and the
calculation to provide the final answer.
Can anyone help me with this?
I'm not sure what happened but I submitted this answer on the 28th and I
can't believe it was deleted already...

Thanks in advance
G
 
G

Greegan

Thank you that was awesome!


Rowan said:
Try something like:

Sub MsgTimer()
Dim StartTime As Single
Dim EndTime As Single
StartTime = Timer
'Your code here
EndTime = Timer
MsgBox "Time taken: " & EndTime - StartTime & " seconds"
End Sub

Regards
Rowan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top