What is VBA TIME Function
The VBA TIME function is listed under the time category of VBA functions. When you use it in a VBA code, it returns the current time in the result. This current time will be according to the system’s current time.
how to use it
To use VBA's TIME function you need to understand its syntax and arguments:
- There’s no argument to specify in this function.
Example to use TIME Function in VBA
To practically understand how to use VBA TIME function, you need to go through the below example where we have written a vba code by using it:
Sub example_TIME() Range("A1").Value = Time() End Sub
In the above code, we have used TIME to get the current time in the cell A1.
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.