Dim szBuffer As String, lBuffSize As Long, RetVal As Boolean
' Skapa Buffer
szBuffer = Space(255)
lBuffSize = Len(szBuffer)
RetVal = GetUserName(szBuffer, lBuffSize)
If RetVal Then
MsgBox "Användarnamnet är " & UCase(Trim(szBuffer)), vbInformation
Else
MsgBox "GetUserName misslyckades", vbInformation
End If