ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Iser name (https://www.excelbanter.com/new-users-excel/201622-iser-name.html)

wayne

Iser name
 
Hi, is there a way that I can find who the active user(s) is/are? ie
Name or staff number etc

TIA
Wayne

Andy Pope

Iser name
 
Hi,

Although this recent blog post was about users initials it contains many
ways of getting users name.
http://www.dailydoseofexcel.com/arch...ials-in-excel/

Cheers
Andy

wayne wrote:
Hi, is there a way that I can find who the active user(s) is/are? ie
Name or staff number etc

TIA
Wayne


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

Gord Dibben

Iser name
 
You want Excel username or login username?

There is a difference.

Function User()
Application.Volatile
User = Application.UserName 'name in ToolsOptionsGeneral
End Function

Function login()
Application.Volatile
login = Environ("Username")
End Function


Gord Dibben MS Excel MVP


On Sun, 07 Sep 2008 08:55:30 +0100, wayne wrote:

Hi, is there a way that I can find who the active user(s) is/are? ie
Name or staff number etc

TIA
Wayne



wayne

Iser name
 
On Sun, 07 Sep 2008 06:51:46 -0700, Gord Dibben <gorddibbATshawDOTca
wrote:

You want Excel username or login username?

There is a difference.

Function User()
Application.Volatile
User = Application.UserName 'name in ToolsOptionsGeneral
End Function

Function login()
Application.Volatile
login = Environ("Username")
End Function


Gord Dibben MS Excel MVP



The 2nd one is the one for me sir. All I need now is to be able to
record/saxe the username of whoever opened/closed the sheet lasr.

Any hlep greatly appreciated

On Sun, 07 Sep 2008 08:55:30 +0100, wayne wrote:

Hi, is there a way that I can find who the active user(s) is/are? ie
Name or staff number etc

TIA
Wayne


Gord Dibben

Iser name
 
Place this code in Thisworkbook module.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
With ThisWorkbook
With Worksheets("Sheet1")
.Range("A1").Value = "Last Saved By " _
& Environ("UserName") & " " & Now
End With
.Save
End With
End Sub

Or if you want a permanent record in a list use the following instead.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim lastrow As Range
With ThisWorkbook
With Worksheets("Sheet1")
Set lastrow = .Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0)
lastrow.Value = "Last Saved By " _
& Environ("UserName") & " " & Now
End With
.Save
End With
End Sub


Gord


On Thu, 11 Sep 2008 19:42:49 +0100, wayne wrote:

On Sun, 07 Sep 2008 06:51:46 -0700, Gord Dibben <gorddibbATshawDOTca
wrote:

You want Excel username or login username?

There is a difference.

Function User()
Application.Volatile
User = Application.UserName 'name in ToolsOptionsGeneral
End Function

Function login()
Application.Volatile
login = Environ("Username")
End Function


Gord Dibben MS Excel MVP



The 2nd one is the one for me sir. All I need now is to be able to
record/saxe the username of whoever opened/closed the sheet lasr.

Any hlep greatly appreciated

On Sun, 07 Sep 2008 08:55:30 +0100, wayne wrote:

Hi, is there a way that I can find who the active user(s) is/are? ie
Name or staff number etc

TIA
Wayne



wayne

Iser name
 
On Thu, 11 Sep 2008 12:22:02 -0700, Gord Dibben <gorddibbATshawDOTca
wrote:

Place this code in Thisworkbook module.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
With ThisWorkbook
With Worksheets("Sheet1")
.Range("A1").Value = "Last Saved By " _
& Environ("UserName") & " " & Now
End With
.Save
End With
End Sub

Or if you want a permanent record in a list use the following instead.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim lastrow As Range
With ThisWorkbook
With Worksheets("Sheet1")
Set lastrow = .Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0)
lastrow.Value = "Last Saved By " _
& Environ("UserName") & " " & Now
End With
.Save
End With
End Sub


Gord


On Thu, 11 Sep 2008 19:42:49 +0100, wayne wrote:

On Sun, 07 Sep 2008 06:51:46 -0700, Gord Dibben <gorddibbATshawDOTca
wrote:

You want Excel username or login username?

There is a difference.

Function User()
Application.Volatile
User = Application.UserName 'name in ToolsOptionsGeneral
End Function

Function login()
Application.Volatile
login = Environ("Username")
End Function


Gord Dibben MS Excel MVP



The 2nd one is the one for me sir. All I need now is to be able to
record/saxe the username of whoever opened/closed the sheet lasr.

Any hlep greatly appreciated

On Sun, 07 Sep 2008 08:55:30 +0100, wayne wrote:

Hi, is there a way that I can find who the active user(s) is/are? ie
Name or staff number etc

TIA
Wayne



That's just fantastic. Superlatives fail me. MVP is a real
understatement

any,many thanks
wayne

Gord Dibben

Iser name
 
Thanks for the feedback

Gord

On Thu, 11 Sep 2008 22:05:19 +0100, wayne wrote:

On Thu, 11 Sep 2008 12:22:02 -0700, Gord Dibben <gorddibbATshawDOTca
wrote:

Place this code in Thisworkbook module.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
With ThisWorkbook
With Worksheets("Sheet1")
.Range("A1").Value = "Last Saved By " _
& Environ("UserName") & " " & Now
End With
.Save
End With
End Sub

Or if you want a permanent record in a list use the following instead.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim lastrow As Range
With ThisWorkbook
With Worksheets("Sheet1")
Set lastrow = .Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0)
lastrow.Value = "Last Saved By " _
& Environ("UserName") & " " & Now
End With
.Save
End With
End Sub


Gord


On Thu, 11 Sep 2008 19:42:49 +0100, wayne wrote:

On Sun, 07 Sep 2008 06:51:46 -0700, Gord Dibben <gorddibbATshawDOTca
wrote:

You want Excel username or login username?

There is a difference.

Function User()
Application.Volatile
User = Application.UserName 'name in ToolsOptionsGeneral
End Function

Function login()
Application.Volatile
login = Environ("Username")
End Function


Gord Dibben MS Excel MVP



The 2nd one is the one for me sir. All I need now is to be able to
record/saxe the username of whoever opened/closed the sheet lasr.

Any hlep greatly appreciated

On Sun, 07 Sep 2008 08:55:30 +0100, wayne wrote:

Hi, is there a way that I can find who the active user(s) is/are? ie
Name or staff number etc

TIA
Wayne



That's just fantastic. Superlatives fail me. MVP is a real
understatement

any,many thanks
wayne




All times are GMT +1. The time now is 08:30 PM.

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