To get the user's logon name, use a VBA function like
Declare Function GetUserName Lib "advapi32.dll" Alias
"GetUserNameA" _
(ByVal lpBuffer As String, nSize As Long) As Long
Function GetLogonName() As String
Dim N As Long: N = 255
Dim S As String
S = String(N, " ")
GetUserName S, N
GetLogonName = Left(S, N - 1)
End Function
You can then call this from a cell with =GetLogonName()
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.