UserName Property

Microsoft Excel Visual Basic

UserName Property

       

Returns or sets the name of the current user. Read/write String.

Example

This example displays the name of the current user.

MsgBox "Current user is " & Application.UserName