Dim objNetwork
Dim objExcel
Dim objWorkBook
Set objExcel = CreateObject("EXCEL.APPLICATION")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Add()
objworkbook.ActiveSheet.Range("A1").value = "DisplayComputername"
Set objNetwork = CreateObject("WScript.NetWork")
Dim strComputer
strComputer = objNetwork.ComputerName
Msg strComputer
Set objNetwork = Nothing