The problem with the typical Left/Right/SubStr method of IP subnet matching is that it doesn't scale at all, much less well, and doesn't take netmasks into account.. you need to match specific values. This results in lots of duplicate code for matching each possible network.

With the two functions mentioned, you supply a host address, and a network address with an ARBITRARY netmask.. so - if you wanted to perform a task for anyone in the 192.168.8,9,10,or 11.x subnets, you could do
 Code:
If InSubnet('192.168.12.243', '192.168.8.0/22') 
  'Is in subnet!' ? 
EndIf 
instead of hard coding 4 separate matches. This works even if these are four distinct networks with 255.255.255.0 netmasks.

aacajo - make sure you download and install the appropriate UDF - InSubnet is on my web site, and IsInSubnet is here and on my site.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D