Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel 2010 VBA creation date

How to get the current workbook file creation date using VBA in excel 2010? I browsed all the properties of ThisWorkBook I don't seem to find something there.

like image 768
CoolStraw Avatar asked Jul 28 '11 13:07

CoolStraw


People also ask

How do you check when an Excel file was created?

If you simply want to see the creation time and last modification timcreae in Excel (for Excel 2016), the way to do it is just to: Click on “File” Select “Info” Find the information you need under the “Related Dates” section.

How do I enable VBA in Excel 2010?

Select the Developer tab from the toolbar at the top of the screen. Then click on the Visual Basic option in the Code group. Now the Microsoft Visual Basic editor should appear and you can view your VBA code.

How do I get the current date in VBA?

Today means the current date. In the worksheet, the NOW function does the same thing, which gives us the current date and time, but there is no built-in Today function in VBA. So instead, the method to get the system's current date is by using the Date function.


1 Answers

MsgBox ActiveWorkbook.BuiltinDocumentProperties("Creation Date")
'Output: 25.07.2011 14:51:11 

This works for Excel 2003, don't have 2010 to test it. Link to MSDN Doc for Office 2010, there is a list with other available properties on there, too.

like image 73
Jacob Avatar answered Sep 21 '22 12:09

Jacob