Learn Excel - Simplify Life with Excel Concepts

Excel FileDateTime Function (VBA)

FileDateTime Function VBA Code

How to use the FileDateTime Function (VBA)

This Excel tutorial explains how to use the Excel FileDateTime function with syntax and examples using VBA.

SUMMARY:

The Excel VBA FileDateTime function returns the date and time of when a file was created or last modified.

PURPOSE:

To get the date and time when a file was created or last modified.

RETURN VALUE:

The FileDateTime function returns a Date value.

SYNTAX:

FileDateTime(pathname)

ARGUMENTS:

The FileDateTime function syntax has the following arguments:

  • pathname: Required. The pathname argument is a string expression that specifies a file name.
    • The pathname may include the directory or folder, and the drive.

REMARKS:

  • If the specified file is not available then an error will occur.

Useful Links: Link 1Link 2Link 3Link 4