Get The Username of The Current logged in User

Category:
Forms and Controls
Type:
Snippets
Difficulty:
Beginning
Author:
Vineeth Venugopal

Version Compatibility: Visual Basic 6

More information:
This small program gives you the user name of the person currently logged into the system on which you are currently executing this code. You only need to create a form with a command button to test the code.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: