Hi all,
I am using the following but not getting the application username.
Can anyone please help me?
Thanks
I am using the following but not getting the application username.
Can anyone please help me?
Thanks
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim r As Excel.Range
Set r = Union(Range("A1:A5"), Range("C1:C5"))
If Intersect(r, Target) Is Nothing Then
Exit Sub
End If
Cells(Target.Row, 1).Value = Environ("USERNAME")
Cells(Target.Row, 3).Value = Now() '// Or TIME() if you only want the time entered
Cancel = True
End Sub