Novell username

A

Arvin Meyer [MVP]

Try:

Function NetworkUserName () As String

Dim iStringLength As Integer
Dim sString As String * 255

iStringLength = Len(sString)
sString = String$(iStringLength, 0)

If WNetGetUser(sString, iStringLength) = 0 Then
NetworkUserName = Left$(sString, iStringLength)
Else
NetworkUserName = "Unknown"
End If

End Function
 
G

Guest

Arvin, thanks for response

Where is WNerGetUser defined.
If I use function as you described, get Compile Error : Function or Sub not
defined (on WNetGetUser)

TIA again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top