|
>▼miyake さん
チョット訂正です。要りませんの行を削除して下さい。
>
>Function IpAddrCaluc(IpAddr As String, num As Long) As String
> Dim v As Variant
> Dim i As Long
> Dim j As Long 要りません
> Dim h As String
> Dim hD As String
>
> For j = 0 To 1 要りません
> h = ""
> v = Split(IpAddr, ".")
> For i = 0 To UBound(v)
> hD = Hex(v(i))
> If Len(hD) = 1 Then hD = "0" & hD
> h = h & hD
> Next
> h = Format(Hex(CLng("&H" & h) + num - 1), "00000000")
> If Len(h) = 7 Then h = "0" & h
> ReDim v(3)
> For i = 0 To 3
> v(i) = CLng(" &H" & Mid(h, i * 2 + 1, 2))
> Next
> h = Join(v, ".")
> IpAddrCaluc = h
> Next 要りません
>End Function
|
|