VBA Now function

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Now Function Description

The VBA Now function returns the current system date and time.

It can be easily used to measure the time elapsed on Hours, Minutes and Seconds (see examples below).

VBA Now Syntax

The syntax for the Now function in VBA is:

Parameters

The function does not accept any parameters.

Other Notes

The VBA Now function returns a date variable with the date and time values. If you want just the current system time use the VBA Time function.

Example Usage

The Now function can be used in VBA code. Let’s look at some VBA Now function examples:

Measure time elapsed in Hours / Minutes / Seconds

You can also use the VBA Now function to measure the time elapsed in Hours, Minutes and Seconds between 2 time intervals: