Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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-



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default How to get system login name

are you looking for

Environ("UserName")

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

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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default How to get system login name

Environ("UserName")

--
HTH

Bob Phillips

"39N 95W" wrote in message
...
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-





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How to get system login name

Here is how to access the newtork logon

msgbox( CreateObject("WScript.Network").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-




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I open an Excel file on XP system, saved on a Vista system JLS7 Excel Discussion (Misc queries) 3 December 2nd 08 04:21 AM
How to get system login name 39N 95W Excel Programming 2 July 15th 05 11:15 PM
Login System Jim Thomlinson[_4_] Excel Programming 1 July 14th 05 02:40 AM
Login System STEVE BELL Excel Programming 0 July 13th 05 10:57 PM
excel causing system to be in low system resource inenewbl Excel Discussion (Misc queries) 0 April 5th 05 04:11 PM


All times are GMT +1. The time now is 04:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"