Results 1 to 4 of 4

Thread: Dynamic Split and rebuild!!!! Can this be done

  1. #1

    Thread Starter
    Lively Member nokia8210's Avatar
    Join Date
    Dec 2002
    Location
    Coventry
    Posts
    92

    Dynamic Split and rebuild!!!! Can this be done

    Hi need your help again.

    I have a multiline textbox that holds an address ( i wanted seperate boxes for each line but...) it can hold any amount of lines say

    1 could have:

    123 the street
    London
    L10 3MN


    2 could have:

    123 the street
    West hill
    City
    PostCode
    Country


    this then needs to be imported into a word doc via a bookmark.

    if i just put it straight into the bookmark you get all the carridge returns but want the address to read

    123 the street, West hill, City, Postcode, Country


    is there any way of doing this dynamically so that it doesn't matter how many lines there are it will still show all the data????


    please help this is one of the last things needed for my program

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    something like this then...
    VB Code:
    1. Dim strResult As String
    2.         Dim x As Integer
    3.         For x = TextBox1.Lines.GetLowerBound(0) To TextBox1.Lines.GetUpperBound(0)
    4.             strResult += TextBox1.Lines(x) & ","
    5.         Next
    6.         MessageBox.Show(strResult)
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  3. #3

    Thread Starter
    Lively Member nokia8210's Avatar
    Join Date
    Dec 2002
    Location
    Coventry
    Posts
    92
    ok will try that tomorrow (if now = 00:57 then bed end if) so going to bed now

  4. #4

    Thread Starter
    Lively Member nokia8210's Avatar
    Join Date
    Dec 2002
    Location
    Coventry
    Posts
    92
    sorry the data is held in a dataset column not in an actual textbox

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