ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to get system login name (https://www.excelbanter.com/excel-programming/334690-how-get-system-login-name.html)

39N 95W

How to get system login name
 
Windows XP Pro
Excel 2002 SP3

Is it possible to get the system login name (if it exists)? I want to do a
user check in the workbook open event so I can restrict some sheets from
certain edits, based on the user of course.

Any help appreciated.

-gk-


================================================== ======================
"The creative act is not the province of remote oracles or rarefied
geniuses but a transparent process that is open to everyone."
-Greg Kot in Wilco Learning How To Die-



bigwheel

How to get system login name
 
there is a possibility ...

Application.UserName

Test it first with something like

MsgBox "Current user is " & Application.UserName


"39N 95W" wrote:

Windows XP Pro
Excel 2002 SP3

Is it possible to get the system login name (if it exists)? I want to do a
user check in the workbook open event so I can restrict some sheets from
certain edits, based on the user of course.

Any help appreciated.

-gk-


================================================== ======================
"The creative act is not the province of remote oracles or rarefied
geniuses but a transparent process that is open to everyone."
-Greg Kot in Wilco Learning How To Die-




Bob Phillips[_7_]

How to get system login name
 
That is the name define within ToolsOptions, user amendable, not the login
name.

--
HTH

Bob Phillips

"bigwheel" wrote in message
...
there is a possibility ...

Application.UserName

Test it first with something like

MsgBox "Current user is " & Application.UserName


"39N 95W" wrote:

Windows XP Pro
Excel 2002 SP3

Is it possible to get the system login name (if it exists)? I want to

do a
user check in the workbook open event so I can restrict some sheets from
certain edits, based on the user of course.

Any help appreciated.

-gk-


================================================== ======================
"The creative act is not the province of remote oracles or rarefied
geniuses but a transparent process that is open to everyone."
-Greg Kot in Wilco Learning How To Die-







All times are GMT +1. The time now is 10:36 AM.

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