What I would like my sheet to do is in cell M2 have the users name show and in cell M3 have the current time show. But I only want these cells to change IF the user enters or changes any other cell in the document. That range is B5 - M14. So if anyone changes one of those cells, then M2 and M3 only change at that point. I am using the code below which works when the workbook is opened but others need to open the workbook just to view it and I don't want M2 or M3 to change for people that will only view the document.
I had set it to work on "save only" but when someone embeds the file in an e-mail they technically don't have to save the document and in that case M2 and M3 won't change.
Thank you for any help on this.
VBA Code:
Private Sub Workbook_Open()
Dim Ws As Worksheet
Set Ws = ActiveSheet
Ws.Range("M2") = Environ("Username")
Ws.Range("M3") = Now
End Sub
I had set it to work on "save only" but when someone embeds the file in an e-mail they technically don't have to save the document and in that case M2 and M3 won't change.
Thank you for any help on this.