last Modified date in Excel spreadsheet  
Author Message
dangster_gangster





PostPosted: Visual Basic for Applications (VBA), last Modified date in Excel spreadsheet Top

Hello

Can anyone help me read details about a current workbook.

Bascally everytime an excel spreadsheet is opened I want to saved the last modified date to say Sheet1.range("A1")

Thank you in advance.



Microsoft ISV Community Center Forums1  
 
 
Derek Smyth





PostPosted: Visual Basic for Applications (VBA), last Modified date in Excel spreadsheet Top

Hey man,

The Workbook has a property named 'BuiltinDocumentProperties' that you can use to get pieces of information about the document. One of these is the Last Save Time

Cells(1, 1) = ActiveWorkbook.BuiltinDocumentProperties(12)

12 is the last saved time property. This will return an error is the workbook hasn't been saved.



 
 
rexwrx





PostPosted: Visual Basic for Applications (VBA), last Modified date in Excel spreadsheet Top

can this be done with a UDF instead

i've this so far:

Function FileSavedTime(w As Workbook) As Date


FileSavedTime = w.BuiltinDocumentProperties("Last Save Time")

End Function