View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Syed Faisal[_2_] Syed Faisal[_2_] is offline
external usenet poster
 
Posts: 1
Default Capturing user name

I am trying to keep a running log of every user who opens a workbook. On
startup, I'm running a macro that includes the "Application.UserName"
command to get the user name. However, many users of the workbook have
Excel set up so that the username returned by "Application.UserName" is
simply "Registered User". The "Registered User" seems to be an Excel
artifact only, based on what is entered in "Tools Options General User
name"

Is there a way in VB to get a "lower-level" user name, from Windows itself
maybe? Because even on the machines that have "Registered User" in Excel,
the actual person's name can be found in Windows (2000) "My Computer"
properties. I would like to somehow bypass Excel's "Registered User" value
and get the person's real user name as set in Windows.

TIA.

-SF