Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA/EXCEL/IP AdDress Change

Status
Not open for further replies.

dangermouse069

Technical User
Mar 17, 2004
2
SE
Hi All...

New Here but need help..

I am trying to find a away of changeing an IP address using VBA..IE

Importing am IP to a Template, but the IP adress needs to be change adding 3 to the End.. ie

10.220.28.33 to 10.220.28.36


Thanks in Advance..
 
Try something like this:
myArr = Split(oldIP, ".")
If UBound(myArr) = 3 Then
myArr(3) = myArr(3) + 3
newIP = Join(myArr, ".")
End If

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top