Last Modified by...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

how do I find out who last modified the file that I want to check?
Eg.:
I open an Excel-File and want to know, who did the last modification and
saved it and when did he/she did that.
I want to run a small macro to display the Username in a Textbox on the
screen.

thanks for your help!

Wim-Jan
 
'-----------------------------------------------------------------
Function DocProps(prop As String)
'-----------------------------------------------------------------
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function


and enter in a cell such as
=DocProps ("last author")
or
=DocProps ("last save time")



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
- Goto "Tools->Macro->Visual Basic Editor"
OR
simply presss ALT-F11

- Select your excel workbook in "Project Explorer"
- Select "ThisWorkBook"
- Paste the following code

=====================================
Private Sub Workbook_Open()
Dim UName, RecPointer
UName = InputBox("Name", "Who are you?:")
RecPointer = Sheet3.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
Sheet3.Cells(RecPointer, 1) = UName
Sheet3.Cells(RecPointer, 2) = Date
Sheet3.Cells(RecPointer, 3) = Time
End Sub
=====================================

I have used "Sheet3" to save user data
you can use a different one, replace "Sheet3" with your sheet name

*** Please do rate ***
 
thanks, that helped to log the last user.
I saw, that I can use this script also to log other data.
Very helpfull, thanks a lot!
 
thanks Naveen, that is a very nice idea! I had not thought about that! also
usefull!
rgds,
Wim-Jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top