Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
    
    lngNameLength = 128
    strComputerName = String(lngNameLength, " ")
    GetComputerName strComputerName, lngNameLength
    MsgBox Trim(strComputerName)