Did you read NTDOC's reply about the dependencies? You need the following two UDF's for IsInIPRange() to work.

IsInSubnet

BinaryIP

If you already know that and have included them in your script, then i guess the question is what error are you getting?
_________________________
Eric