wes2706
04-04-2017, 09:58 PM
I am running a macro within Excel, and would need to show the time taken to run the macro by way of message box (Msgbox).
So I need to record the time that the macro start- say T1.
Time that the macro ends- say T2
Take the difference and report it in minutes and seconds..
(it takes about a minute and a half….sometimes less than a minute)
The msgbox should give a message like this:
“Great! All the columns are successfully extracted.
This task took X minutes and Y seconds”.
If it’s less than 1 minute….just
“This task took Y seconds”.
Can someone please help?
So I need to record the time that the macro start- say T1.
Time that the macro ends- say T2
Take the difference and report it in minutes and seconds..
(it takes about a minute and a half….sometimes less than a minute)
The msgbox should give a message like this:
“Great! All the columns are successfully extracted.
This task took X minutes and Y seconds”.
If it’s less than 1 minute….just
“This task took Y seconds”.
Can someone please help?