Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving user name 1

Status
Not open for further replies.

rpg121

Programmer
Mar 14, 2001
89
US
I'm dealing with only Windows 2000 and XP systems. Is there a way to get the username of the current user logged into the computer like you can with .net? With .net, I'd type my.user.name. Can I do that in VB6?

Thanks!

Josh Bart
MCP, A+, Network+
 
Take a look at this thread.

thread222-1378946

Swi
 
Perfect. username = Environ$("username") worked great. Thank you.

Josh Bart
MCP, A+, Network+
 
I'm not a big fan of using Environ for this sort of info, since it is not necessarily correct.
 
Thank you for the confirmation strongm. In the thread link above I mentioned that but was not sure if I was correct.

Swi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top