Try
Public Function NetUser() As String Dim sUName$ Dim lCnt As Long, lRet As Long
NetUser = "" sUName = String$(255, 0) lCnt = 255 lRet = GetUserName(sUName, lCnt) If lCnt > 0 Or lRet <> 0 Then NetUser = Left(sUName, lCnt - 1) End If
End Function
I got this from somewhere else.
Lava
------------------------------------------------ Lava Boggavarapu Lava Trading Inc. 95 Morton Street New York, NY 10014
Tel 212.519.9371 Mobile 732.668.2935 -----Original Message-----
I am
trying to get the logged in windows user name to record the The information contained in this message and any attachments (the "Message") is intended for specific individual(s), and may be confidential or proprietary. If you are not the intended recipient, please notify the sender immediately, delete this Message and do not disclose. Messages are not secure or error free and can contain viruses and the sender is not liable for any of these occurrences. The sender reserves the right to monitor, record and retain Messages.
YAHOO! GROUPS LINKS
|
- [AccessDevelopers] getting the windows user name jezmo_codpiece
- Re: [AccessDevelopers] getting the windows user name Manuel Tejada
- [AccessDevelopers] Re: getting the windows user name Richard
- RE: [AccessDevelopers] getting the windows user name Lava Boggavarapu
- RE: [AccessDevelopers] getting the windows user name Cathy Jupp
- RE: [AccessDevelopers] getting the windows user name Lava Boggavarapu
- RE: [AccessDevelopers] getting the windows user name Cathy Jupp
- RE: [AccessDevelopers] getting the windows user name Lava Boggavarapu
- RE: [AccessDevelopers] getting the windows user name Cathy Jupp
- [AccessDevelopers] Re: getting the windows user ... Duane Hennessy