Skip to main content

Time function

Table of contents
  1. Syntax
  2. Remarks
  3. Example

Returns a Variant (Date) indicating the current system time.

Syntax

Time

Remarks

To set the system time, use the Time statement.

Example

This example uses the Time function to return the current system time.

Dim MyTime
MyTime = Time    ' Return current system time.

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>