Hi,

I am facing on issue. I need user id with time. In column A if my team members activate the cell then I need current user id with time. Like below

akulka58 HH:MM:SS

I nee these for my checklist. If we put code or any custom function then can I share that workbook?

Till date I achived below code but it is not fulfilling my requirements.

Public Declare Function GetUserName Lib "advapi32.dll" _
Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

Function GetUser() As String
Dim lpBuff As String * 255
Dim ret As Long, UserName As String
ret = GetUserName(lpBuff, 255)
GetUser = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)
End Function

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim KeyCells As Range
    Set KeyCells = Range("A1:C10")
    If Not Application.Intersect(KeyCells, Range(Target.Address)) _
           Is Nothing Then
        ActiveCell.Value = GetUser
    End If
End Sub