После нескольких дней исследований.Я разобрался в сценарии.Вот ответ
Dim strAllIP, strUsedIP, strAvailableIps
Dim ynum, xnum, counter, outercounter
ynum = 0
xnum = 0
counter = 0
outercounter = 0
strAllIP = Array("192.168.1.1","192.168.1.2","192.168.1.3", _
"192.168.1.4","192.168.1.5","192.168.1.6", _
"192.168.1.7","192.168.1.8","192.168.1.9", _
"192.168.1.10","192.168.1.11","192.168.1.12", _
"192.168.1.13", "192.168.1.14")
strUsedIP = Array("192.168.1.1","192.168.1.2")
For each i in strAllIP
For each j in strUsedIP
If i = j Then
Exit For
End if
counter = counter + 1
If counter - 1 = Ubound(strUsedIP) Then
Match = True
Exit for
End if
Next
counter = 0
If match = True Then
Redim preserve newarray(outercounter)
newarray(outercounter)= i
outercounter = outercounter + 1
End if
Match = False
Next
strAvailableIps = join(newarray,chr(13))
msgbox strAvailableIps,0,"Available IPs"