Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This should get you started:
Look in VBA help under BuiltinDocumentProperties for more details. You might like to change what sh and wb are in order that you don't write over existing data and you report the details of the correct file. HTH, Gareth Sub GetFileDetails() Dim wb As Workbook Dim sh As Worksheet Set sh = ActiveSheet Set wb = ActiveWorkbook With sh .Cells(1, 1).Value = "File name:" .Cells(1, 2).Value = wb.Name .Cells(2, 1).Value = "Location:" .Cells(2, 2).Value = wb.Path .Cells(3, 1).Value = "Created:" .Cells(3, 2).Value = Format( _ wb.BuiltinDocumentProperties("creation date"), _ "dd mmm yyyy") .Cells(4, 1).Value = "Created Today?" .Cells(4, 2).Value = Date = DateSerial( _ Year(wb.BuiltinDocumentProperties("creation date")), _ Month(wb.BuiltinDocumentProperties("creation date")), _ Day(wb.BuiltinDocumentProperties("creation date"))) End With Set wb = Nothing Set sh = Nothing End Sub jesterhs wrote: I am not all that familiar with VBA. Could anyone give me a step by step to getting this to work. I tried on my own first but was unsucessful. Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Displaying File Timestamp of Another Excel File | Links and Linking in Excel | |||
Displaying File Timestamp of Another Excel File | Charts and Charting in Excel | |||
Excel Sheet Timestamp | Excel Worksheet Functions | |||
Getting timestamp from a file in Excel | Excel Worksheet Functions | |||
Timestamp function that does not update in Excel? | Excel Worksheet Functions |