title: Excel 2013 - Insert "last modified by user" in field
body: <p>I have an inventory checklist that I'm supposed to be maintaining, but we have multiple people in the office that edit and make changes to the document. As a tracking measure, we want to implement a macro that inserts the username of the person who last modified or even opened the file (modified would be better).</p>
  
  <p>I have already tried inserting the following Auto_Open macro:</p>
  
  <pre><code>Private Sub Workbook_Open()
      Sheets("Inventory List").Range("D31").Value = Environ("username")
  End Sub
  </code></pre>
  
  <p>Where "Inventory List" is the primary worksheet and the cell I want it inserted is D31. I got it to work for my name, but when my coworkers open it and change it, it does not insert their name. I have already saved the file as a macro-enabled worksheet, and they have all allowed and trusted the macro content when they open the file.</p>
  
  <p>Anything I'm doing wrong?</p>
  
  <hr>
  
  <p>Source used: <a href="http://office.microsoft.com/en-us/excel-help/run-a-macro-HA102748985.aspx#_Toc304793168" rel="nofollow">http://office.microsoft.com/en-us/excel-help/run-a-macro-HA102748985.aspx#_Toc304793168</a></p>