Sub IP()
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set IPConfigSet = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration ")
For Each IPConfig In IPConfigSet
On Error Resume Next
s = ""
s = s & "Description: " & IPConfig.Description & vbCrLf
ss = ""
For i = LBound(IPConfig.IPAddress) To UBound(IPConfig.IPAddress)
ss = ss & IPConfig.IPAddress(i) & " "
Next
s = s & "IPAddress: " & ss & vbCrLf
s = s & "MACAddress: " & IPConfig.MACAddress & vbCrLf
MsgBox s
Next
End Sub