Results 1 to 6 of 6

Thread: [RESOLVED] String Break

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2008
    Posts
    97

    Resolved [RESOLVED] String Break

    If let's said i have a string variable.

    Example
    Str = "123456789132456789................" (a lot of datas)

    so how can i break them up ??

    Str = "12345678913456478
    123456789"

    I cannot do something like that in the above. So how can i make sure that they are still under the same variable of Str.

    Thanks

  2. #2
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: String Break

    What do you mean by "break up"?
    Display the String on a MultiLine Lable?
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  3. #3
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: String Break

    You need to have some sort of delimiter like...

    "1;2;3;4;5;6"

    then to store them in a string array just use split()

    Code:
    Dim str as string: str = "1;2;3;4;5;6"
    Dim mystr() as String
    mystr() = Split(str,";")

  4. #4
    Head Hunted anhn's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    3,669

    Re: String Break

    Code:
    Str = "12345678913456478" & vbNewLine & "123456789"
    
    '--If it's too long:
    
    Str = "12345678913456478" & vbNewLine & _
          "123456789"
    Last edited by anhn; Jan 18th, 2008 at 03:13 AM.

  5. #5
    Lively Member
    Join Date
    Nov 2007
    Posts
    98

    Re: String Break

    or maybe you mean this?

    VB Code:
    1. Str = "12345678913456478" & _
    2.       "123456789"

    by using this method, it will ensure you have all the data on the same Str variable.

    good luck

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jan 2008
    Posts
    97

    Re: String Break

    ok thanks.

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