Add New Line to String

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MrNate
    New Member
    • Jun 2006
    • 4

    Add New Line to String

    I have a simple request - how can i concatenate several strings together in a text area and make sure that each string is inserted on a new line?

    "TextArea" = _
    & "FullName: " & txtFirstName.Te xt & " " & txtLastName.Tex t _
    & " Course: " & strCourse _
    & " Expiry: " & ddlExpireDay.Se lectedValue & " " ddlExpMon.Selec tedValue
    & " Heard About: " & ddlHeardAbout.S electedValue
  • suresh_punniyakkodi
    New Member
    • Aug 2006
    • 20

    #2
    Hi, Please follow the following steps,
    using vbcrlf to create a new line, Please use this vbcrlf, and concatenate to string to create a new line.

    Comment

    • jpezhil
      New Member
      • Sep 2006
      • 9

      #3
      Use VbnewLine (Add New Line String)

      "TextArea" = "FullName: " & txtFirstName.Te xt & " " &_
      txtLastName.Tex t & VbnewLine & Course: " & strCourse &_
      VbnewLine & " Expiry: " & ddlExpireDay.Se lectedValue & VbnewLine

      ----
      Thanking U(For U'r Reply)

      Comment

      • deepakpb
        New Member
        • Sep 2006
        • 5

        #4
        [USE THE BELOW CODE

        "TextArea" = _
        & "FullName: " & txtFirstName.Te xt & " " & txtLastName.Tex t _
        & VBNEWLINE & " Course: " & strCourse _
        & VBNEWLINE & " Expiry: " & ddlExpireDay.Se lectedValue & " " ddlExpMon.Selec tedValue
        & VBNEWLINE & " Heard About: " & ddlHeardAbout.S electedValue[/QUOTE]


        you can use the vbNewLine keyword to add a newline in the strings

        Comment

        Working...