Results 1 to 4 of 4

Thread: [RESOLVED] Separate text

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2005
    Location
    Bosnia and Herzegovina
    Posts
    65

    Resolved [RESOLVED] Separate text

    Hi,

    I have the following string:
    "name1 | name2 | name3"

    what I would like is that when I press the button it copies me:
    name1 to Text1.Text
    name2 to Text2.Text
    name3 to Text3.Text

    Adnan

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Separate text

    VB Code:
    1. Dim sParts() As String, N As Long
    2. sParts = Split("name1 | name2 | name3", " | ")
    3. For N = 0 To UBound(sParts)
    4.     Me.Controls("Text" & N).Text = sParts(N)
    5. Next N

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2005
    Location
    Bosnia and Herzegovina
    Posts
    65

    Re: Separate text

    thanx

  4. #4
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: [RESOLVED] Separate text

    Now that we've helped you, you can help us by pulling down the Thread Tools menu and clicking the Mark Thread Resolved button which will let everyone know that you have your answer. Also if someone has been particularly helpful, or even particularly unhelpful, you have the ability to affect a their forum "reputation" by rating their post.
    .

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