Hey,
I just try to do the same...
I think you schould convert the IP-Range into two Long and then you can
check if the IP is between the two values.
What I'm searching for is an easy way to get out of an IP and the
subnetmask the range of the possible IPs like:
192.168.0.1 Subnet 255.255.240.0
Chris
Public Function IP2Long(ByVal DottedIP As String) As Object
Dim arr = Split(DottedIP, ".")
If UBound(arr) = 3 Then
For i As Byte = 1 To 4
If arr(i - 1) > 255 Or arr(i - 1) < 0 Then Return 0
IP2Long = ((arr(i - 1) Mod 256) * (256 ^ (4 - i))) + IP2Long
Next
End If
End Function
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!