CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2001
    Posts
    8

    How to differentiate the IP Address

    I have a small problem.
    I am unable to split the Ip Address.
    for eg. 123.123.123.123. I want to have it in the fashion a=123, b=123,c=123, d=123 having separated bythe dot(.)


  2. #2
    Join Date
    Feb 2000
    Location
    Ireland
    Posts
    808

    Re: How to differentiate the IP Address

    use the split function in VB6 which will split the into an array for you


  3. #3
    Join Date
    Feb 2000
    Location
    Ireland
    Posts
    808

    Re: How to differentiate the IP Address

    Heres code that will do it

    Dim Myarray() as string
    Dim Mystring
    Mystring = "123.123.123.123"
    Myarray = Split(Mystring, ".")
    MsgBox Myarray(0)
    MsgBox Myarray(1)
    MsgBox Myarray(2)
    MsgBox Myarray(3)





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured