Hi,
put the following in a module
Declare Function wu_GetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As
String, nSize As Long) As Long
Function ap_GetUserName() As Variant
On Error GoTo Err_ap_GetUserName
Dim strUserName As String
Dim lngLength As Long
Dim lngResult As Long
'-- Set up the buffer
strUserName = String$(255, 0)
lngLength = 255
'-- Make the call
lngResult = wu_GetUserName(strUserName, lngLength)
'-- Assign the value
ap_GetUserName = strUserName
Exit_ap_GetUserName:
Exit Function
Err_ap_GetUserName:
MsgBox Err.Description & vbCrLf & Erl()
Resume Next
End Function
and call the above function and it will return the nt/domain login
and problems post back here.
regards
Alex