Results 1 to 2 of 2

Thread: ackward loop Q [resolved]

Threaded View

  1. #1

    Thread Starter
    Junior Member VBnewbie2002's Avatar
    Join Date
    Sep 2002
    Posts
    29

    ackward loop Q [resolved]

    *edit* wow u guys are good..thanks


    i'm sending information over network w/ winsock and i want to take this information and put it in a listbox

    an example of how it comes in w/ Getdata

    Nick....]Joe....]Mike....]]

    whats between the name and the "]" is not important, i just used them to seperate the data
    and the double "]" at the end signifies the end of the data i need



    i want the listbox to have
    Nick....
    Joe.....
    Mike....


    i need help with a loop that will find the "]" and take the data up to that point, and then search after that point in the next run of the loop
    Do you understand? here's what i tried but it didn't work right
    Code:
    Do
    sTemp1 = Mid(sData, 10)
    sTemp2 = Mid(sTemp1, 1, InStr(1, sTemp1, "]") + 1)
    strX = Right(sTemp2, 2)
    sTemp3 = Left(sTemp2, Len(sTemp2) - 2)
    List1.AddItem sTemp3
    
    Loop Until strX = "]]"
    Last edited by VBnewbie2002; Apr 8th, 2003 at 05:43 PM.

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