' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and 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
