Use the following methods of the WshNetwork object, which is available after you reference the Windows Script Host Object Model in your project:
Dim Network As WshNetwork
Set Network = New WshNetwork
Debug.Print "ComputerName: " & Network.ComputerName
Debug.Print "UserDomain: " & Network.UserDomain
Debug.Print "UserName: " & Network.UserName





