5. VBA Tips - Time Your Code

Nick's picture


How do you time how long it takes for VBA code to run ?

Simple..

Step1: At the start of your code, create a variable called "Start" (or whatever)

Set it = Timer (that takes a snapshot of the time)

 

Step2: At the End of your code, you can use a messagebox to display how long it took.

MsgBox Timer - Start & " Seconds"

time-VBA-code

Download Spreadsheet to see example of how to Time VBA code

Training Video on how to time your code: