Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Write Reserved gives "Your Name" rather than user name 1

Status
Not open for further replies.

gungfukid

Programmer
Apr 9, 2001
9
GB
I have used the Write Reserved function (VBA) to find the current user of a file. However, this gives "Your Name" rather than displaying the correct username.

I am on a network, running WinNT and assume it is to do with a setting between WInNT and Excel.

Does anyone know the cause, or better still, the remedy to this problem?

Thanks!
 
Hmmm - the name on excel has nothing really to do with NT - it's down to whoever built the computer (or more to the point, whoever installed the office files).
One workaround would be to get the username (myUser = Environ("username") ) as part of the wb_open event and write it to a seperate file. This file can then be interogated to get the username of whoever is in the file.
I've used this method on a few workbooks and now have a log file with Workbook Name and Last User (with date and time) of entry (and exit) - saves a lot of hassle when people deny making any changes to the workbook
HTH Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top