ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Setting up and Configuration of Excel (https://www.excelbanter.com/setting-up-configuration-excel/)
-   -   Excel and Windows Login ID problem... (https://www.excelbanter.com/setting-up-configuration-excel/125615-excel-windows-login-id-problem.html)

Tad Anglin

Excel and Windows Login ID problem...
 
I need to know if there is a function that will allow an excel spreadsheet
cell to automatically populate itself with the login id of the person using
the computer?

Example of how I would like it to work....
1. A person opens a spreadsheet
2. And bam!! Cell A1 shows their windows login id


Nick Hodge

Excel and Windows Login ID problem...
 
Tad

Try this in the ThisWorkbook module (To implement right click the lower of
the two Excel icons, top left of the window and select view code, paste here
and close out) it will place the Username in cell A1 on sheet1...Bam!

Private Sub Workbook_Open()
Worksheets("Sheet1").Range("A1").Value = Environ("Username")
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Tad Anglin" wrote in message
...
I need to know if there is a function that will allow an excel spreadsheet
cell to automatically populate itself with the login id of the person
using
the computer?

Example of how I would like it to work....
1. A person opens a spreadsheet
2. And bam!! Cell A1 shows their windows login id



Tad Anglin

Excel and Windows Login ID problem...
 
Nick....

Thanks for taking some time out of your day...that worked beautifully.

BAM!



"Nick Hodge" wrote:

Tad

Try this in the ThisWorkbook module (To implement right click the lower of
the two Excel icons, top left of the window and select view code, paste here
and close out) it will place the Username in cell A1 on sheet1...Bam!

Private Sub Workbook_Open()
Worksheets("Sheet1").Range("A1").Value = Environ("Username")
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


"Tad Anglin" wrote in message
...
I need to know if there is a function that will allow an excel spreadsheet
cell to automatically populate itself with the login id of the person
using
the computer?

Example of how I would like it to work....
1. A person opens a spreadsheet
2. And bam!! Cell A1 shows their windows login id




All times are GMT +1. The time now is 07:27 PM.

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