how do I insert user name into a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to insert the user name from the Tools Options General tab into a
spreadsheet cell.
I have EXCEL 2003
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top