I have a spreadsheet in which I have there is a cell I want the user name to appear. I am using a function in VBA to get the logon name of the user.
Function GetUserName() As String
Dim lpBuff As String * 25
Get_User_Name lpBuff, 25
GetUserName = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)
End Function
I would like to pass the returned value into a Vlookup in which I have a table with the logon names and then the users full name. Having trouble constructing the formula in the cell.
Thx.
Function GetUserName() As String
Dim lpBuff As String * 25
Get_User_Name lpBuff, 25
GetUserName = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)
End Function
I would like to pass the returned value into a Vlookup in which I have a table with the logon names and then the users full name. Having trouble constructing the formula in the cell.
Thx.