' Collection of code snippets by Arne Vajhøj ' posted to eksperten.dk, usenet and other places (2002-now) Function ShowNics() Dim wmi, nics, nic, ip Set wmi = GetObject("winmgmts:") Set nics = wmi.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True") For Each nic In nics If Not IsNull(nic.IPAddress) Then For Each ip In nic.IPAddress MsgBox (nic.ServiceName & " " & nic.MACAddress & " " & ip) Next End If Next Set nics = Nothing Set wmi = Nothing End Function