#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default 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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default 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.

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
Automatically add a textbox to a user form based on user requireme Brite Excel Programming 4 April 7th 07 11:37 PM
User form ComboBox Items: Remember user entries? [email protected] Excel Programming 0 March 29th 07 06:41 PM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM
User Defined Functions - Help Text - Make it Easy for the User Andibevan[_2_] Excel Programming 4 March 17th 05 09:51 AM
How to: Make user click End User License Agreement acceptance jasonsweeney[_21_] Excel Programming 7 January 30th 04 01:41 AM


All times are GMT +1. The time now is 08:45 PM.

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"