saving the last user who edited the file

  • Thread starter Thread starter kman
  • Start date Start date
K

kman

Hi,
I want to see on my excel sheet who is the last user who edited the
file
or last saved date. similar to the "LASTSAVEDBY" or "SAVEDATE" in
msword
 
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
ThisWorkbook.Worksheets("Sheet1").Range("A1") = Environ("Username")
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 

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