ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   userName (https://www.excelbanter.com/excel-programming/341023-username.html)

Ronbo

userName
 
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



Norman Jones

userName
 
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





Ronbo

userName
 
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






Myrna Larson

userName
 
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






Ronbo

userName
 
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







Bob Phillips[_6_]

userName
 
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









Shawn

userName
 
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




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

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