User name

M

mkraizrool

The user name is set in Tools>Options>General tab

How can I get that user name to display in a cell?
 
M

Martin Fishlock

Hi mkraizrool:

You need to user vba and it is a simple function.

Function GetUserName() As String
GetUserName = Application.UserName
End Function

To open the vba enter ALT+F11.
Insert a module ALT+I M
paste it in and then in cell A1 =GetUserName()
and it should work.
 
M

Mike Rogers

mkraizrool

Bob's solution seems to work for me. Copy Bob's code into a Module and in
the cell that you want the user name displayed place the formula =ThisUser()
and enter out. The name is there. Kinda Cool!!!

Mike Rogers
 
Top