Include Active DS Type Library.
This gets the Login and Full Name off the server.
There are lots of different things you can find out.
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Function fncGetUserFullName() As String
On Error GoTo errorHandler
Dim oUser As ActiveDs.IADsUser
Set oUser = GetObject("WinNT://YOURDOMAINHERE/" & fncGetUserLogin)
fncGetUserFullName = oUser.FullName()
Exit Function
errorHandler:
fncGetUserFullName = "Anonymous"
End Function
Public Function fncGetUserLogin() As String
On Error GoTo errorHandler
Dim s As String
Dim cnt As Long
Dim dl As Long
cnt = 199
s = String$(200, 0)
dl = GetUserName(s, cnt)
If dl <> 0 Then fncGetUserLogin = Left$(s, cnt - 1) Else fncGetUserLogin = ""
Exit Function
errorHandler:
fncGetUserLogin = "Anonymous"
End Function