How to get system login name

3

39N 95W

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-
 
G

Guest

are you looking for

Environ("UserName")

if Environ("UserName")="My User" then
' code here
end if
 
G

Guest

Here is how to access the newtork logon

msgbox( CreateObject("WScript.Network").UserName)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top