how do I insert user name into a cell

  • Thread starter Grant Robertson
  • Start date
G

Grant Robertson

I am trying to insert the user name from the Tools Options General tab into a
spreadsheet cell.
I have EXCEL 2003
 
R

Ron Coderre

But, the easiest way would be:

Open a standard VBA module and past in this code:

'----Start of Code------
Option Explicit
Function NetworkUserName() As String
Dim response
NetworkUserName = Environ("Username")
End Function
'----End of Code------

Then...in any ceil in that workbook enter: =NetworkUserName()

Does that help?

***********
Regards,
Ron
 
G

Grant Robertson

Ron,
This gives me my network log in name.
I need my EXCEL user name.
I have tried ammending your code and the code from the link you supplied but
cannot make it work.

Cheers
Grant
 
G

Grant Robertson

Ron,
I have it problem solved thanks

Grant Robertson said:
Ron,
This gives me my network log in name.
I need my EXCEL user name.
I have tried ammending your code and the code from the link you supplied but
cannot make it work.

Cheers
Grant
 
Top