Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel VBA & Novell

Status
Not open for further replies.

tony813

Technical User
Dec 28, 2002
14
0
0
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top