ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I get network userid in a cell in excel? (https://www.excelbanter.com/excel-programming/357513-how-can-i-get-network-userid-cell-excel.html)

Kalpana_Kar

How can I get network userid in a cell in excel?
 
I am in need of some function or macro to populate a column in an excel
spreadsheet for existing rows with the user's network login id.



Jim Thomlinson

How can I get network userid in a cell in excel?
 
Add this code to a standard module in your project. You can then just add the
formula =loginid() to the cell that you want to display the user name...

public function LoginId() as string
application.volatile
LoginID = Environ("UserName")
end function
--
HTH...

Jim Thomlinson


"Kalpana_Kar" wrote:

I am in need of some function or macro to populate a column in an excel
spreadsheet for existing rows with the user's network login id.



tony h[_92_]

How can I get network userid in a cell in excel?
 

environ("USERNAME")


--
tony h
------------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=527842



All times are GMT +1. The time now is 06:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com