戻る
Private Sub Command1_Click() Dim MyWSNet As Object Dim MyPCName As String Set MyWSNet = CreateObject("WScript.Network") MyPCName = MyWSNet.ComputerName MsgBox MyPCName, vbInformation, "コンピュータ名を取得" Set MyWSNet = Nothing End Sub
Private Sub Command1_Click()
Dim MyWSNet As Object Dim MyPCName As String Set MyWSNet = CreateObject("WScript.Network") MyPCName = MyWSNet.ComputerName MsgBox MyPCName, vbInformation, "コンピュータ名を取得" Set MyWSNet = Nothing
Dim MyWSNet As Object Dim MyPCName As String
Set MyWSNet = CreateObject("WScript.Network")
MyPCName = MyWSNet.ComputerName
MsgBox MyPCName, vbInformation, "コンピュータ名を取得"
Set MyWSNet = Nothing
End Sub