Table of contents
TOC
Collapse the table of content
Expand the table of content

Profile.UserName Property (Project)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Gets or sets the logon name of the current account profile. Read/write String.

Syntax

expression. UserName

expression A variable that represents a Profile object.

Remarks

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.

Example

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
© 2018 Microsoft