Function IP2NUM (SIP)
DIM STR1, STR2, STR3, STR4
DIM NUM
IP2NUM = 0
IF IsNumeric (Left (SIP, 2)) THEN
STR1 = Left (SIP, INSTR (SIP, ") - 1)
SIP = MID (SIP, INSTR (SIP, ") 1)
STR2 = Left (SIP, INSTR (SIP, ") - 1)
SIP = MID (SIP, INSTR (SIP, ") 1)
STR3 = Left (SIP, INSTR (SIP, ") - 1)
STR4 = MID (SIP, INSTR (SIP, ") 1)
Num = cint (str1) * 256 * 256 * 256 cint (str2) * 256 * 256 cint (str3) * 256 CINT (STR4) -1
IP2num = NUM
END IF
END FUNCTION