Obtain User ID

  • Thread starter Thread starter AL
  • Start date Start date
Use

Environ("Username")

This returns the Windows user name.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top