Add a catchall case to the select...endselect block.

Add as the last case:
code:
case 1
? "Failed to find IP range"

You may also wnat to add the following code to see what each IsInIPrange() returns:
code:
? "isiniprange($ipaddress,$iparray[0]) = " + isiniprange($ipaddress,$iparray[0])
? "isiniprange($ipaddress,$iparray[1]) = " + isiniprange($ipaddress,$iparray[1])
? "isiniprange($ipaddress,$iparray[2]) = " + isiniprange($ipaddress,$iparray[2])

_________________________
Home page: http://www.kixhelp.com/hb/