Ryan,
The first line of code generates the error
'user-defined type not defined' do you know how to resolve this?
Craig
Here is some code that will take care of what you need. Let me know how it works!
Craig,
You must set a Reference to the Microsoft Runtime Scripting Library for this code. To do this, in the VBE, go to Tools --> References and find this Library and check it. It should work from here. Let me know!
Ryan
Robert,
Here is some code that will take care of what you need. Let me know how it works!
Ryan
Sub GetDateCreated()
' This requires a Reference to Microsoft Runtime Scripting Library
Dim FSO As Scripting.FileSystemObject
Dim FileItem As Scripting.File
Set FSO = New Scripting.FileSystemObject
Set FileItem = FSO.GetFile(ActiveWorkbook.Path & "\" & ActiveWorkbook.Name)
End Sub
Robert,
Here is the correct code. I left the key thing out in the other post. Let me know how it works!
Ryan
Sub GetDateCreated()
' This requires a Reference to Microsoft Runtime Scripting Library
Dim FSO As Scripting.FileSystemObject
Dim FileItem As Scripting.File
Dim DateCreated As String
Set FSO = New Scripting.FileSystemObject
Set FileItem = FSO.GetFile(ActiveWorkbook.Path & "\" & ActiveWorkbook.Name)
DateCreated = FileItem.DateCreated
End Sub