Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to identify a the user
Hello Helpers!!
What VBA code would you use to identify a the user in windows NT from excel? Thanks in Advance!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to identify a the user
try this
Environ("UserName") -- Gary "Angelo Battistoni" wrote in message ... Hello Helpers!! What VBA code would you use to identify a the user in windows NT from excel? Thanks in Advance!! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to identify a the user
You may wish to try any or all of the following which return different bits
of info as labeled: Public Function ReturnUserName() As String 'RETURN THE USER NAME AS RECORDED IN [TOOLS][OPTIONS][GENERAL] ReturnUserName = Application.UserName End Function Public Function ReturnNetworkName() As String 'RETURNS NETWORK LOGIN ID OF CURRENT USER ReturnNetworkName = Environ("UserName") End Function Public Function ReturnComputerName() As String 'RETURNS COMPUTER NUMBER USER IS ON ReturnComputerName = Environ("ComputerName") End Function Use these like this example: Dim sUser as String sUser = ReturnNetworkName Msgbox sUser HTH. "Angelo Battistoni" wrote: Hello Helpers!! What VBA code would you use to identify a the user in windows NT from excel? Thanks in Advance!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to identify operating system user in excel? | Excel Programming | |||
Identify when a user attempts to turn on "Allow cell drag and drop" | Excel Programming | |||
Identify User Selected Range | Excel Programming | |||
Identify Range Selected By User | Excel Programming | |||
Identify if another user has spreadsheet open - in VBA | Excel Programming |