"Last Modified by"

  • Thread starter Thread starter daltex
  • Start date Start date
D

daltex

Is there a way to insert a "Last Modified By" function in a worksheet? For
example, if a document is accessed by many users and you want to know who
modfied it last time and have their name automatically inserted say at the
bottom of the sheet with perhaps the NOW function. Thanks for any help.
 
try this code.

you will find the username in column Z

Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("a1:iv65536")
If Intersect(Target, r) Is Nothing Then Exit Sub
Application.EnableEvents = False
Cells(Target.Row, "Z").Value = Environ("username")
Application.EnableEvents = True
End Sub
 
Thank you. I need something simpler, though.

Gaurav said:
try this code.

you will find the username in column Z

Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("a1:iv65536")
If Intersect(Target, r) Is Nothing Then Exit Sub
Application.EnableEvents = False
Cells(Target.Row, "Z").Value = Environ("username")
Application.EnableEvents = True
End Sub
 
Select Properties from the File menu and look on the Statistics tab.

Hope this helps,

Hutch
 

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