Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Control Panel System = Registered to Ronald L. Lastname
In Excel, Tools Options General = User name: Ronald L. Lastname Function USER() USER = Application.UserName = Ronald L. Lastname End Function Function USER2() USER2 = Environ("UserName") = Ron Lastname End Function Any help on what is going on would be appreciated. Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Ronbo,
I believe that Environ("UserName") returns the Windows logon name which is not necessarily the same as the Control Panel System = Registered to "name." or the Excel name. --- Regards, Norman "Ronbo" wrote in message ... Control Panel System = Registered to Ronald L. Lastname In Excel, Tools Options General = User name: Ronald L. Lastname Function USER() USER = Application.UserName = Ronald L. Lastname End Function Function USER2() USER2 = Environ("UserName") = Ron Lastname End Function Any help on what is going on would be appreciated. Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry for being unclear. What you said is exactly what I have learned. When
I check the Windows logon name by: Control Panel System; it = registered to Ronald L. Lastname Yet when I use ; Environ("UserName") It returns - Ron Lastname Why?? Thanks for your help. Ronbo "Norman Jones" wrote: Hi Ronbo, I believe that Environ("UserName") returns the Windows logon name which is not necessarily the same as the Control Panel System = Registered to "name." or the Excel name. --- Regards, Norman "Ronbo" wrote in message ... Control Panel System = Registered to Ronald L. Lastname In Excel, Tools Options General = User name: Ronald L. Lastname Function USER() USER = Application.UserName = Ronald L. Lastname End Function Function USER2() USER2 = Environ("UserName") = Ron Lastname End Function Any help on what is going on would be appreciated. Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Control panel is telling you what name the person used that installed Windows.
On a multi-user system, that could very well be a different person than the current user. Even if there's only one user, that person can set up his Windows account using a different name that he used when installing Windows. On Sat, 24 Sep 2005 19:43:03 -0700, "Ronbo" wrote: Sorry for being unclear. What you said is exactly what I have learned. When I check the Windows logon name by: Control Panel System; it = registered to Ronald L. Lastname Yet when I use ; Environ("UserName") It returns - Ron Lastname Why?? Thanks for your help. Ronbo "Norman Jones" wrote: Hi Ronbo, I believe that Environ("UserName") returns the Windows logon name which is not necessarily the same as the Control Panel System = Registered to "name." or the Excel name. --- Regards, Norman "Ronbo" wrote in message ... Control Panel System = Registered to Ronald L. Lastname In Excel, Tools Options General = User name: Ronald L. Lastname Function USER() USER = Application.UserName = Ronald L. Lastname End Function Function USER2() USER2 = Environ("UserName") = Ron Lastname End Function Any help on what is going on would be appreciated. Thanks |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Its not a multi user system. So what is, Environ("UserName") really
returning, where does it find it and how can I check it? "Myrna Larson" wrote: Control panel is telling you what name the person used that installed Windows. On a multi-user system, that could very well be a different person than the current user. Even if there's only one user, that person can set up his Windows account using a different name that he used when installing Windows. On Sat, 24 Sep 2005 19:43:03 -0700, "Ronbo" wrote: Sorry for being unclear. What you said is exactly what I have learned. When I check the Windows logon name by: Control Panel System; it = registered to Ronald L. Lastname Yet when I use ; Environ("UserName") It returns - Ron Lastname Why?? Thanks for your help. Ronbo "Norman Jones" wrote: Hi Ronbo, I believe that Environ("UserName") returns the Windows logon name which is not necessarily the same as the Control Panel System = Registered to "name." or the Excel name. --- Regards, Norman "Ronbo" wrote in message ... Control Panel System = Registered to Ronald L. Lastname In Excel, Tools Options General = User name: Ronald L. Lastname Function USER() USER = Application.UserName = Ronald L. Lastname End Function Function USER2() USER2 = Environ("UserName") = Ron Lastname End Function Any help on what is going on would be appreciated. Thanks |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You have already been told, Environ ("Username") returns the login name.
Only the system administrators control what is used here, the users do not, whereas the value in Excel ToolsOptions can be changed by that user. The Excel value was useful when the systems didn't login, like Win95, but is not of much use nowadays that I can see. -- HTH Bob Phillips "Ronbo" wrote in message ... Its not a multi user system. So what is, Environ("UserName") really returning, where does it find it and how can I check it? "Myrna Larson" wrote: Control panel is telling you what name the person used that installed Windows. On a multi-user system, that could very well be a different person than the current user. Even if there's only one user, that person can set up his Windows account using a different name that he used when installing Windows. On Sat, 24 Sep 2005 19:43:03 -0700, "Ronbo" wrote: Sorry for being unclear. What you said is exactly what I have learned. When I check the Windows logon name by: Control Panel System; it = registered to Ronald L. Lastname Yet when I use ; Environ("UserName") It returns - Ron Lastname Why?? Thanks for your help. Ronbo "Norman Jones" wrote: Hi Ronbo, I believe that Environ("UserName") returns the Windows logon name which is not necessarily the same as the Control Panel System = Registered to "name." or the Excel name. --- Regards, Norman "Ronbo" wrote in message ... Control Panel System = Registered to Ronald L. Lastname In Excel, Tools Options General = User name: Ronald L. Lastname Function USER() USER = Application.UserName = Ronald L. Lastname End Function Function USER2() USER2 = Environ("UserName") = Ron Lastname End Function Any help on what is going on would be appreciated. Thanks |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't know what you are trying to accomplish, but I often use:
Application.UserName This return the user name of the application (In this case, excel). Sometimes I only want macros to trigger for certain users and this is how I set it up. Of course, you have to have them go, in excel, to tools options general to see how they have their username typed. -- Thanks Shawn "Ronbo" wrote: Control Panel System = Registered to Ronald L. Lastname In Excel, Tools Options General = User name: Ronald L. Lastname Function USER() USER = Application.UserName = Ronald L. Lastname End Function Function USER2() USER2 = Environ("UserName") = Ron Lastname End Function Any help on what is going on would be appreciated. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
(username v1) | Excel Discussion (Misc queries) | |||
Username Log | Excel Discussion (Misc queries) | |||
Username | Excel Programming | |||
username | Excel Programming | |||
Get NT Username | Excel Programming |