Thread: Obtain User ID
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Obtain User ID

Few more.

If you want to check the domain and user name use the below ...

'-----Retrieve Domain Name
' Reference Active DS Type Library Tools|Reference
Dim strAD As New ADSystemInfo
strDomainname = strAD.DomainShortName

'-----Get User Name
Set objNet = CreateObject("WScript.NetWork")
strUserName = Trim(objNet.UserName)

If this post helps click Yes
---------------
Jacob Skaria


"AL" wrote:

Using Visual Basic in Excel, how do I obtain the user ID of the user opening
the file?