by Jalil Iqbal (2 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 2nd August 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Get User and Computer Name(Just in Two Line Code)
Set WN = CreateObject("Wscript.Network")
MsgBox "User Name: " & WN.UserName & vbCr & "Computer Name: " & WN.ComputerName
End Sub