creation date and time

Public Schedule Face-to-Face & Virtual Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Creation date and time of a file

Creation date and time of a file

resolvedResolved · High Priority · Version 2007

Alain has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Access Introduction course
Access Intermediate course
Access Advanced course
Access VBA course
Introduction to Management course

Creation date and time of a file


I would like to check if a file was delivered on an FTP server and be able to get its creation date and time in order to do statistics (and assess the different data providers).

Regarding the first point I intend to check if the file exists. However the name of the file will change every day since it will contain a date stamp. This is why I would need to wildcard part of the name.

Then I would like to check the properties of the file to see its creation date and time without opening it. Alternatively and if there is no other easy solution I am happy for Excel to open the file and get its properties.

Please let me know if you have any suggestion.

I thank you in advance for your help.


RE: Creation date and time of a file

Hi Alain, thanks for your query. What you want to achieve is a good general use of VBA. I would open the file in memory (using an object variable) and access the file properties that way rather than "manually" opening the file. There's a good walkthrough here, involving the creation of a function to do so:

Hope this helps,


RE: Creation date and time of a file

Hi Anthony,

Thanks for your help. This code should be able to do the job.



Training courses


Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


Excel tip:

Using an equal (=) sign that isn't part of a formula

Before you type the equal sign, type an apostrophe: '
Then type your equal sign: = (and anything else you want to add after your equal sign)
Press ENTER.

(the apostraphe will disappear

View all Excel hints and tips

Server loaded in 0.06 secs.