ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Know the real name and surname of user logged... (https://www.excelbanter.com/excel-programming/374887-know-real-name-surname-user-logged.html)

sal21

Know the real name and surname of user logged...
 
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?


Bob Phillips

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?





All times are GMT +1. The time now is 04:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com