I'm not sure that I understand your question but if it's the user name you want you can do this in two ways on WinNT and Win2000.
The first is to call the GetUserName API function:
Code:
Public Declare Function GetUserName _
Lib "advapi32.dll" Alias "GetUserNameA" ( _
ByVal lpBuffer As String, _
nSize As Long) As Long
Public Function GetCurrentUser() As String
Dim sUserName As String
sUserName = Space$(250)
Call GetUserName(sUserName, Len(sUserName))
sUserName = Left$(sUserName, Instr(sUserName, vbNullChar) - 1)
GetCurrentUser = sUserName
End Function
This will work on all Windows OS.
The second way will only work on WinNT and Win2000 and that is to check the UserName environment variable:
Code:
Public Function GetCurrentUser() As String
GetCurrentUser = Environ("UserName")
End Function
Good luck!