View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Know the real name and surname of user logged...


Public Function GetFullLoginName() As String
Dim Domain As String
Dim User As String
With CreateObject("Wscript.Network")
Domain = .UserDomain: User = .UserName
End With
GetFullLoginName = GetObject("WinNT://" & Domain & "/" & User &
",user").FullName
End Function



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"sal21" wrote in message
...
I know the way to know the ID name of user logged on PC, but i want to

know
the real name of user Name and Surname (for example Jhon Smith) and store

it
in a cells...?
Or.. if existis in wich part of dir, text file or other is stored this
information?