MAC-adress:

Private Sub SpecificationsNet()
'http://www.sql.ru/forum/actualthread.aspx?tid=276571
Dim strComputer As String
Dim objWMIService As Object, colBIOS As Object, objBIOS As Object

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colBIOS = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapter")
For Each objBIOS In colBIOS
Debug.Print "Name adapter: " & objBIOS.name
Debug.Print "MAC-adress: " & objBIOS.MACAddress
If Not IsNull(objBIOS.MACAddress) Then Range("A1") = objBIOS.MACAddress
Next
Set objWMIService = Nothing
End Sub

Добавить комментарий

Ваш адрес email не будет опубликован.