Results 1 to 6 of 6

Thread: text string and new line

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    3

    Exclamation

    Have transfered text to a richtextformat form but I want the text string to have new lines occasionally, justified to the left. Have tried \n, $, and cant find this in any index.
    Any help would be appreciated.
    Thanks

  2. #2
    Guest

    Question Not sure what you want but.....

    string1 & vbCRLF & string2

    Will buffer

    string1
    string2

    Hope that helps

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    3
    I have managed to string lots of text together--but will use a shortened example i.e. "Date" & "Time" & "Month" from a template that I developed. I then have been able to export them to another form which has a RTF box. I would like the each one of these to be justifed to the left.
    I tried the String1 and String2 but I probably was not doing it correctly. I would appreciate it if you could type it just like it should go on the code. Thanks for helping.

  4. #4
    Addicted Member
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    184

    Have you tried this?

    "Date" & vbNewLine & "Time" & vbNewLine & "Month" etc...

    This puts each element on a new line (left justified, if the control is).

  5. #5
    Guest

    Ok.......................

    Code:
       txtBox = "Date" & vbcrlf & "Time" & vbcrlf & "Month"
    The rtf should have it's justification property set to Left, and it's multi-line property set to true.

    Am using vb5 sp3, so might be a better method in vb6.

  6. #6

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    3

    thank you very much

    It has worked--thanks so much.

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