ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   User Name (https://www.excelbanter.com/excel-programming/431019-user-name.html)

leungkong

User Name
 
I want to make a form, for example a leave application form.
when the staff sumit the form, admin will receive a mail and admin's
database will be marked some information to calculate the balance of annual
leave.

I used Application.UserName to make a form.
But I find that some people have changed their user name or remove the user
name.
for example, the deflaut name should be "mkelly", but their change it to
"Mick Kelly".

So, I cannot match the user ID in database.

Can I get the computer Login name in Macros?
Thanks in advance.

stanleydgromjr[_17_]

User Name
 

leungkong,

Try:

Retreiving Full Name of User (Not Username) in VBA script
Environ("USERNAME")

This link may help:
'Excel Windows Username'
(http://www.mrexcel.com/archive/VBA/13778.html)


--
stanleydgromjr
------------------------------------------------------------------------
stanleydgromjr's Profile: http://www.thecodecage.com/forumz/member.php?userid=503
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=115292


leungkong

User Name
 
Thanks Stanley,

But I wanna know the difference of Environ("USERNAME") and
application.username
Could you please explain? Many thanks again.


"stanleydgromjr" wrote:


leungkong,

Try:

Retreiving Full Name of User (Not Username) in VBA script
Environ("USERNAME")

This link may help:
'Excel Windows Username'
(http://www.mrexcel.com/archive/VBA/13778.html)


--
stanleydgromjr
------------------------------------------------------------------------
stanleydgromjr's Profile: http://www.thecodecage.com/forumz/member.php?userid=503
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=115292



Gary Keramidas

User Name
 
if you go to help/about, you'll see the application.username, the name you
supplied when you installed the product.
environ("username") is the name you logged into windows with.

--

Gary Keramidas
Excel 2003


"leungkong" wrote in message
...
Thanks Stanley,

But I wanna know the difference of Environ("USERNAME") and
application.username
Could you please explain? Many thanks again.


"stanleydgromjr" wrote:


leungkong,

Try:

Retreiving Full Name of User (Not Username) in VBA script
Environ("USERNAME")

This link may help:
'Excel Windows Username'
(http://www.mrexcel.com/archive/VBA/13778.html)


--
stanleydgromjr
------------------------------------------------------------------------
stanleydgromjr's Profile:
http://www.thecodecage.com/forumz/member.php?userid=503
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=115292




Jacob Skaria

User Name
 
Using Application.Username you can set or get the current user name. This can
also be accessed via menuToolsGeneralUserName.........whereas 'Environ'
returns a string associated with an OS environment.

If this post helps click Yes
---------------
Jacob Skaria


"leungkong" wrote:

Thanks Stanley,

But I wanna know the difference of Environ("USERNAME") and
application.username
Could you please explain? Many thanks again.


"stanleydgromjr" wrote:


leungkong,

Try:

Retreiving Full Name of User (Not Username) in VBA script
Environ("USERNAME")

This link may help:
'Excel Windows Username'
(http://www.mrexcel.com/archive/VBA/13778.html)


--
stanleydgromjr
------------------------------------------------------------------------
stanleydgromjr's Profile: http://www.thecodecage.com/forumz/member.php?userid=503
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=115292



EricG

User Name
 
Here are methods for getting the user's full name, and their Windows login ID.

HTH,

Eric

http://www.mvps.org/access/api/api0066.htm

http://www.mvps.org/access/api/api0008.htm


"leungkong" wrote:

I want to make a form, for example a leave application form.
when the staff sumit the form, admin will receive a mail and admin's
database will be marked some information to calculate the balance of annual
leave.

I used Application.UserName to make a form.
But I find that some people have changed their user name or remove the user
name.
for example, the deflaut name should be "mkelly", but their change it to
"Mick Kelly".

So, I cannot match the user ID in database.

Can I get the computer Login name in Macros?
Thanks in advance.



All times are GMT +1. The time now is 07:20 PM.

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