View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
the majestic ferny the majestic ferny is offline
external usenet poster
 
Posts: 7
Default How to update last save time & last author for each worksheet

Hello. I found code that allows me to display document properties for
a workbook and I am using it to show the last save time and last author
as well as other document properties. But I think the code only
updates the first worksheet. Would I need to add the code to each
worksheet or is there a way to have it update all worksheets
simultaneously?
Thanks.
Here's the code:
<code
Sub DocumentPropertiesLastModified()
Dim a As String
Dim b As String
Dim c As String
Dim d As String
'Worksheets(1).Activate
d = ActiveWorkbook.BuiltinDocumentProperties("title")
Cells(1, 1).Select
ActiveCell.FormulaR1C1 = d
a = ActiveWorkbook.BuiltinDocumentProperties("last save time")
Cells(2, 5).Select
ActiveCell.FormulaR1C1 = "last modified:" & " " & a
b = ActiveWorkbook.BuiltinDocumentProperties("Author")
Cells(1, 5).Select
ActiveCell.FormulaR1C1 = "created by:" & " " & b
c = ActiveWorkbook.BuiltinDocumentProperties("Last author")
Cells(3, 5).Select
ActiveCell.FormulaR1C1 = "last edited by:" & " " & c
End Sub
</code