Real Users Name Not Lan ID
Hello,
Question, I would like to have a VB Macro that auto populates a Textbox1 with the real name of the user of the form. This form will be used on a very lage network and people sign on with lan ID's. For example My lan is Rk9954 but my real name is Joe Shmoe. When I use Environ("username") is puts out the lan ID as the user. What I need its it to display the Real name of the user. any Help? Lime |
Real Users Name Not Lan ID
Need some API work, but a VB example
http://vbnet.mvps.org/index.html?cod...sergetinfo.htm NickHK "Lime" ... Hello, Question, I would like to have a VB Macro that auto populates a Textbox1 with the real name of the user of the form. This form will be used on a very lage network and people sign on with lan ID's. For example My lan is Rk9954 but my real name is Joe Shmoe. When I use Environ("username") is puts out the lan ID as the user. What I need its it to display the Real name of the user. any Help? Lime |
Real Users Name Not Lan ID
Hi Lime,
You can try: Sub GetFullName() Dim Domain$, User$ With CreateObject("Wscript.Network") Domain = .UserDomain: User = .username End With MsgBox GetObject("WinNT://" & Domain & "/" & User & ",user").fullname, 64 End Sub MP "Lime" a écrit dans le message de news: ... Hello, Question, I would like to have a VB Macro that auto populates a Textbox1 with the real name of the user of the form. This form will be used on a very lage network and people sign on with lan ID's. For example My lan is Rk9954 but my real name is Joe Shmoe. When I use Environ("username") is puts out the lan ID as the user. What I need its it to display the Real name of the user. any Help? Lime |
All times are GMT +1. The time now is 11:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com