Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820

    Unanswered: automaticaly insert newline character

    i've got addresses in the format xxx,xxx,xxx
    and i want
    xxx,
    xxx,
    xxx

    in c or java i'd append the string "\n" after every ',' now how do i do it in VB i tried:

    Code:
    Me.Address.Value = (Left$(Address.Value, InStrRev(Address.Value, ",") _
    ) & (chr(13)) & Right$(Address.Value, Len(Address.Value) - InStrRev _
    (Address.Value, ",")))
    but that just shows a symbol similar to '|'

    ps ASCII 013 = carriage return
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  2. #2
    Join Date
    Jan 2002
    Location
    UK
    Posts
    67
    I would use vbNewLine or vbCrLf

  3. #3
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    THX
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  4. #4
    Join Date
    Feb 2002
    Posts
    108
    This works for me:

    & Chr$(13) & Chr$(10)

    Add this to any string and it will carriage return line feed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •