Hello Everyone...
I came across this User Defined Function to retrive the UserName from Windows XP:
Public Declare Function getUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Const MAX_BUFFER_LENGTH = 100
Public Function getLoggedUserName() As String
Dim strBufferString As String
Dim lngResult As Long
strBufferString = String(MAX_BUFFER_LENGTH, "X"
lngResult = getUserName(strBufferString, MAX_BUFFER_LENGTH)
getLoggedUserName = Mid(strBufferString, 1, MAX_BUFFER_LENGTH)
End Function
and use in a cell like
=getLoggedUserName()
However, I'm looking for a User Defined Fuction to retrive the UserName from Novell Client 95/98.
Does Anyone Have Any code... ?
Thnx
Tony813
I came across this User Defined Function to retrive the UserName from Windows XP:
Public Declare Function getUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Const MAX_BUFFER_LENGTH = 100
Public Function getLoggedUserName() As String
Dim strBufferString As String
Dim lngResult As Long
strBufferString = String(MAX_BUFFER_LENGTH, "X"
lngResult = getUserName(strBufferString, MAX_BUFFER_LENGTH)
getLoggedUserName = Mid(strBufferString, 1, MAX_BUFFER_LENGTH)
End Function
and use in a cell like
=getLoggedUserName()
However, I'm looking for a User Defined Fuction to retrive the UserName from Novell Client 95/98.
Does Anyone Have Any code... ?
Thnx
Tony813