The VBA Time Function simply returns the current time. The function takes no parameters and therefore, its syntax is:
A simple example of the VBA Time function is shown below:
' Store the current time in the variable currTime
Dim currTime As DatecurrTime = Time() |
After running the above VBA code, the variable currTime is set to the current time.
(Note that in VBA, times are stored as a part of the 'Date' data type).