Option Explicit Dim Winsock Set Winsock = CreateObject("MSWinsock.Winsock") MsgBox Winsock.LocalIP Set Winsock = Nothing