ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Can I pass network logon name to a cell in a spreadsheet? (https://www.excelbanter.com/excel-worksheet-functions/212386-can-i-pass-network-logon-name-cell-spreadsheet.html)

Quality Plan

Can I pass network logon name to a cell in a spreadsheet?
 
I want to be able to use the user logon name to crete a filter only for that
user out of a large data set. Does Excell have a function which passes the
network login user name to a cell?

Mike H

Can I pass network logon name to a cell in a spreadsheet?
 
Hi,

This UDF should do that. Alt +F11 to open VB editor. Right click 'This
workbook' and insert module and paste this in

Function user()
user = Environ("Username")
End Function

Call with

=user()

Mike

"Quality Plan" wrote:

I want to be able to use the user logon name to crete a filter only for that
user out of a large data set. Does Excell have a function which passes the
network login user name to a cell?


The Code Cage Team[_41_]

Can I pass network logon name to a cell in a spreadsheet?
 

If you wanted the apllication user name change Environ("username") for
Application.Username but of course it assumes that they set up a
username when very first opening the application, usually in the case of
networked machines the user just hits the ok button so it will have
their network login.


--
The Code Cage Team

Regards,
The Code Cage Team
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=36552


Rick Rothstein

Can I pass network logon name to a cell in a spreadsheet?
 
This may not be good enough for the OP's purposes as the user can change his/her Excel UserName (what Application.UserName reports) anytime via the General tab of the Options dialog.

--
Rick (MVP - Excel)


"The Code Cage Team" wrote in message ...

If you wanted the apllication user name change Environ("username") for
Application.Username but of course it assumes that they set up a
username when very first opening the application, usually in the case of
networked machines the user just hits the ok button so it will have
their network login.


--
The Code Cage Team

Regards,
The Code Cage Team
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=36552


Gord Dibben

Can I pass network logon name to a cell in a spreadsheet?
 
Function loginname()
Application.Volatile
User = Environ("username")
End Function

In a cell enter =loginname()

Copy/paste the function to a general module in your workbook.


Gord Dibben MS Excel MVP

On Wed, 3 Dec 2008 08:55:00 -0800, Quality Plan
wrote:

I want to be able to use the user logon name to crete a filter only for that
user out of a large data set. Does Excell have a function which passes the
network login user name to a cell?



The Code Cage Team[_42_]

Can I pass network logon name to a cell in a spreadsheet?
 

Rick Rothstein;131863 Wrote:
This may not be good enough for the OP's purposes as the user can change
his/her Excel UserName (what Application.UserName reports) anytime via
the General tab of the Options dialog.

--
Rick (MVP - Excel)

Rick i agree, the information was to give the OP a different
perspective, i didn't explain the nature of it very much, thanks for
picking that up!


--
The Code Cage Team

Regards,
The Code Cage Team
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=36552



All times are GMT +1. The time now is 02:10 PM.

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