I'm trying to make VBA's GetTickCount work so that I can see the runtime of code, but it doesn't have to be super accurate.
The following bit of code works good but I need a few changes and can't work out how to achieve this.
I want the runtime to be presented in the following ways.
- If runtime under 1 second it should be presented in milliseconds. Example: 180 milliseconds
- If runtime under 1 minute but more than 1 second it should be presented in seconds (no milliseconds). Example: 30 seconds
- If runtime OVER 1 minute but less than 1 hour it should be presented in minute second. Example: 1 minute, 30 seconds
- If runtime OVER 1 hour it should be presented in hours, minutes and second Example: 2 hours, 1 minute, 30 seconds
How would I achieve this, any help would be much appreciated.
Bookmarks