Home ➜ VBA ➜ Top VBA Functions ➜ VBA TIME Function (Syntax + Example)
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.
Table of Content Close
Syntax
Time()
Arguments
- There’s no argument to specify in this function.
Example
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.
Related Functions
HOUR | MINUTE | NOW | SECOND | TIMER | TIMESERIAL | TIMEVALUE