Login Name - VBA

G

Guest

Hello,

I am developing an user interface using VBA in which i want to get the
Username using VBA and not inputted by the user manually..

To get this, i thought of using Application.UserName property, but was told
that it would only give the name to whom the Excel is licensed..i can't bet
on it...so what i thought was to get the Login Name used to login to the
System (Windows XP)..

Whoever logs into tthe system and use this program, that name would be
automatically used!!!

Could anybody help me in getting the Login Name using VBA?

Cheers

Sri
 
B

Bob Phillips

Sri,

You have been told correctly. Use

sUser = Environ("UserName")

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top