Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Sub Main()
Dim sUser As String
Dim lpBuff As String * 1024
'Get the Login User Name
GetUserName lpBuff, Len(lpBuff)
sUser = Left$(lpBuff, (InStr(1, lpBuff, vbNullChar)) - 1)
MsgBox "Login User: " & sUser
End Sub
Sub Main()
Dim sUser As String
sUser = VBA.Environ("USERNAME")
MsgBox "Login User: " & sUser
End Sub