Created
June 12, 2013 14:28
-
-
Save talatham/5765768 to your computer and use it in GitHub Desktop.
Convert IP address to integer format.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' ------------------------------------------------------------ | |
' Convert IP Address - convert IP Address to integer format | |
' ------------------------------------------------------------ | |
Function ConvertIP(IPAddress) | |
Dim IPnumber, IPArray, counter | |
IPArray = Split(IPAddress,".") | |
IPNumber = CDbl(0) | |
For counter = 0 To UBound(IPArray) | |
IPNumber = IPNumber * 256 + IPArray(counter) | |
Next | |
ConvertIP = IPNumber | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment