10 replies
by peyison
You can get to it in VBA from the BuiltInDocumentProperties property:
msgbox ActiveWorkbook.BuiltinDocumentProperties("last save time")
Hope this helps.
by gmreed
Thanks for the fast reply. Unfortunately, it is not working for me. It gives error msg: Run-time error '-2147467259 (800040005)': Automation error Unspecified error.
I tested this by creating a button with macro with the specified msgbox text to click to display the message box.
I am using Excel 97.
Thanks for your assistance!
by gmreed
Thanks for the fast reply. Unfortunately, it is not working for me. It gives error msg: Run-time error '-2147467259 (800040005)': Automation error Unspecified error.
I am using Excel 97.
by peyison
by gmreed
by peyison
Try using a modified version of the example in help:
Sub test()
Dim rw As Integer
Dim p As DocumentProperty
On Error Resume Next
rw = 1
Worksheets(1).Activate
For Each p In ActiveWorkbook.BuiltinDocumentProperties
Cells(rw, 1).Value = p.Name
Cells(rw, 2).Value = p.Value
rw = rw + 1
Next
End Sub
I only get values for 6 of the properties (out of 30). Check the properties of your workbook (File -> Properties) - look on the General or Statistics tabs - is there a date in the "Modified:" property?
Like I said - very flaky.
by gmreed
by sankulpune
Hello,
In the beforeSave event of the workbook, insert following code:
ActiveWorkbook.BuiltinDocumentProperties("Last save time") = now
Paste the following macro in personal.xls
sub PrintlastSaveTime()
Selection = ActiveWorkbook.BuiltinDocumentProperties("Last save time")
End Sub
Save the workbook, select a cell and run the macro. You will see the details of the last save in the selected cell.
I would be glad to furnish any more details that would help solving the problem.
Your feedback will be highly appreciated.
with regards,
SanganakSakha,
Simple And Effective Solutions To Small Problems, No QuickFixes.
by gmreed
by gmreed
This discussion is closed to new replies.
Trending Software posts
Sort by Trending