Is there code in VBA I can wrap a function with that will let me know the time it took to run, so that I can compare the different running times of functions?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unless your functions are very slow, you’re going to need a very high-resolution timer. The most accurate one I know is
QueryPerformanceCounter. Google it for more info. Try pushing the following into a class, call itCTimersay, then you can make an instance somewhere global and just call.StartCounterand.TimeElapsed