So, I've cribbed some VBA code to pull the login name of the user into a workbook. (I readily admit that I copied this from another site, as I really have no clue when it comes to VBA.)
This code works a treat for getting the username, and I simply add the formula "=windowsusername()" into whatever cell I want to have it populate.
However, if a different user opens the worksheet, it then changes the result. (That is, if "aliceanders" opens the doc first, then saves it and send it to "bobbrewer", when Bob opens it, the user will be "bobbrewer".)
Question: how can I get this to only update the cell the first time someone opens the document?
The VBA I'm using:
![]()
Please Login or Register to view this content.
Bookmarks