WshNetworkオブジェクトからコンピュータ名を取得 | Lotus Notes Tips! Last modified : 2004/04/07 |
Sub Click(Source As Button) ' --- Windows Scripting Hostオブジェクト作成 Dim wshObject As Variant Set wshObject = CreateObject("WScript.Network") ' --- 表示 msgTitle = "User Information" Msgbox _ "Computer Name : " & wshObject.ComputerName & Chr(13) & _ "User Domain : " & wshObject.UserDomain & Chr(13) & _ "User Name : " & wshObject.UserName & Chr(13), vbInformation, msgTitle End Sub |