I want to have a cell called revised. In that cell I want to record the date and time anyone makes a change to the workbook. Also if possible the user who made the change.
Have you tried "sharing" the workbook. In the tools menu you can share the workbook and have Excel track the changes that are made to it. This will relieve you of having to set up routines to do this manually.
I haven't used the feature but I believe it will allow you to track not just when a workbook has been changed but what and by whom. This should far exceed a date and name routine.
Here's the VB code to do what you need.
substitute any cell ref in the Range() statement, and you may want to add a line to save the workbook when closed or when changes are made.
If you need more instruction, feel free to ask.
Private Sub Worksheet_Change(ByVal Target As Range)
Range("a1" = "Last change made by: " + UCase(Environ("UserName") + " on " + Date$
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.