What is VBA TIMER Function
The VBA TIMER function is listed under the time category of VBA functions. When you use it in a VBA code, it returns the number of seconds that have elapsed since midnight of the current day. In simple words, it returns the number of seconds elapsed passed from 12:00 AM of the current day.
how to use it
To use VBA's TIMER function you need to understand its syntax and arguments:
- There’s no argument to specify in this function.
Example to use TIMER Function in VBA
To practically understand how to use VBA TIMER function, you need to go through the below example where we have written a vba code by using it:
Sub example_TIMER() Range("A1").Value = Timer() End Sub
In the above code, we have used TIMER to get the total seconds that have elapsed since midnight today.
About the Author
Puneet is using Excel since his college days. He helped thousands of people to understand the power of the spreadsheets and learn Microsoft Excel. You can ﬁnd him online, tweeting about Excel, on a running track, or sometimes hiking up a mountain.