VBA TIME Function

HomeVBA Functions LIST (Category Wise)How to use the VBA TIME Function (Syntax + Example)

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:

Syntax

Time()

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.

Related Functions

About the Author

puneet one point one

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 find him online, tweeting about Excel, on a running track, or sometimes hiking up a mountain.