title | ms.service | api_name | ms.assetid | ms.date | ms.localizationpriority | |
---|---|---|---|---|---|---|
Profile.UserName property (Project) |
project-server |
|
8af2fe46-7218-39be-efd0-c7dd91f25ac7 |
06/08/2017 |
medium |
Gets or sets the logon name of the current account profile. Read/write String.
expression.UserName
expression A variable that represents a Profile object.
The UserName property of the Profile object shows the logon name. By comparison, the UserName property of the Application object shows the local user name.
If there are two account profiles, and the user named Jeff Smith logs on with the DOMAIN\jsmith account, the first statement in the following code shows DOMAIN\jsmith in the Immediate pane of the VBE. The second statement shows Jeff Smith.
Debug.Print Profiles(2).UserName
Debug.Print UserName
[!includeSupport and feedback]