ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do I insert user name into a cell (https://www.excelbanter.com/excel-worksheet-functions/58696-how-do-i-insert-user-name-into-cell.html)

Grant Robertson

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

Ron Coderre

how do I insert user name into a cell
 
You'd need a User Defined Function (UDF) to do that if you're interested in
implementing a short VBA program:

This website gives instructions for getting the Excel Username and the
Logged In Username:
http://www.dicks-blog.com/archives/2...ername-in-vba/

Does that help?

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


"Grant Robertson" wrote:

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


Ron Coderre

how do I insert user name into a cell
 
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 Coderre" wrote:

You'd need a User Defined Function (UDF) to do that if you're interested in
implementing a short VBA program:

This website gives instructions for getting the Excel Username and the
Logged In Username:
http://www.dicks-blog.com/archives/2...ername-in-vba/

Does that help?

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


"Grant Robertson" wrote:

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


Grant Robertson

how do I insert user name into a cell
 
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 Coderre" wrote:

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 Coderre" wrote:

You'd need a User Defined Function (UDF) to do that if you're interested in
implementing a short VBA program:

This website gives instructions for getting the Excel Username and the
Logged In Username:
http://www.dicks-blog.com/archives/2...ername-in-vba/

Does that help?

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


"Grant Robertson" wrote:

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


Grant Robertson

how do I insert user name into a cell
 
Ron,
I have it problem solved thanks

"Grant Robertson" wrote:

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 Coderre" wrote:

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 Coderre" wrote:

You'd need a User Defined Function (UDF) to do that if you're interested in
implementing a short VBA program:

This website gives instructions for getting the Excel Username and the
Logged In Username:
http://www.dicks-blog.com/archives/2...ername-in-vba/

Does that help?

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


"Grant Robertson" wrote:

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



All times are GMT +1. The time now is 10:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com