98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum 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
Resolved · 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
Hi,
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.
Alain
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:
http://excelexperts.com/Creation-Date-of-Excel-File
Hope this helps,
Anthony
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
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 formulaBefore you type the equal sign, type an apostrophe: ' |