Tom’s Tutorials For Excel: Workbook Creation Date
If you want to know the creation date and time of the active workbook:
Sub MyCreationDate() Dim myDate As Date myDate = ActiveWorkbook.BuiltinDocumentProperties("Creation date").Value MsgBox Format(myDate, "mmmm d, yyyy at h:mm:ss AM/PM"), , _ "I was born on..." End Sub
If you want to know the creation date and time of a closed or other workbook:
Sub CreationDateWB() Dim objWB As Object, wbName As String, myDate As Double wbName = "C:\Your\File\Path\YourWorkbookName.xls" Set objWB = CreateObject("Scripting.FileSystemObject") myDate = objWB.GetFile(wbName).DateCreated MsgBox wbName & " was created on" & vbCrLf & _ Format(myDate, "mmmm d, yyyy at h:mm:ss AM/PM"), , "FYI..." End Sub
Thanks you for Tom’s Tutorials For Excel. It helps me a lot.
User from Czech Republic
Thank you!!