Return to VBA Code Examples

VBA Timer Function

Timer Description

Returns a Single value representing the number of seconds that have elapsed since midnight.

Simple Timer Examples

Here is a simple Timer example:

Timer Syntax

In the VBA Editor, the syntax for the Timer function.

The Timer function contains no arguments:

Examples of Excel VBA Timer Function

Using the following code example, please try to compare sec1 and sec2.

Then, we can easily know the meaning of Timer function.

Using the Timer function, we can measure how long it would take to run a section of VBA Code.

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro - A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users! vba save as

Learn More!