Log UserID

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I automatically store the NTUser's logonId to an excel file once it is
opened?

I have an excel file that pulls records from a database. Since multiple
users can access the database at the same time, I would like to flag a record
once it is retrieved. I got the flag part down but would also like to update
the record with userId to track what user retrieved what records. How do I
pull the NTUserID and store it in the spreadsheet? Everytime the excel file
is opened, I would like to store the NTUser ID in a cell so I can pull that
value and store it into the database. I just need to know how I can get the
logonId stored to the cell. Any ideas? Thanks.
 
Sorry I assumed that you know how to place that in a cell (which is probably
the case but jut to be thourough)

sheet1.range("A1").value = environ("UserName")

HTH
 
Back
Top