Module IpParser Public Function ParseIP(ByVal IpTxt As String, ByRef IPByte3 As Byte, ByRef IPByte2 As Byte, ByRef IPByte1 As Byte, ByRef IPByte0 As Byte) As Boolean Dim S() As String Dim Exito As Boolean S = IpTxt.Split(".") If UBound(S) = 3 Then IPByte3 = Val(S(0)) IPByte2 = Val(S(1)) IPByte1 = Val(S(2)) IPByte0 = Val(S(3)) Exito = True Else Exito = False End If Return Exito End Function Public Function IpToLong(ByVal IpTxt As String) As Long Dim Ip1, Ip2, Ip3, Ip4 As Byte Dim L As Long ParseIP(IpTxt, Ip4, Ip3, Ip2, Ip1) L = (Ip1 * &H1000000) + (Ip2 * &H10000) + (Ip3 * &H100) + Ip4 Return L End Function End Module