Results 1 to 4 of 4

Thread: vbNewline ---->> help !!

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Posts
    92
    HII !

    i want to know why the textbox that output a report with the follow cod :

    Private Sub Form_Load()
    For I = 0 To 4
    Report_txt.Text = Arryreport(I) & vbNewLine
    Next I
    End Sub

    it's show me only the last report off the arry ( it's run overide the previous report's) .

    please help me and tell me what i can do !!

    10X !!!


  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    Try This. You were assinging a new value to the text box every time you went around the loop. What you need to do is add the text to the text box.

    Code:
    Private Sub Form_Load() 
      For I = 0 To 4 
        Report_txt.Text = Report_txt.Text & Arryreport(I) & vbNewLine 
      Next I 
    End Sub
    Iain, thats with an i by the way!

  3. #3
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    554
    If you wish to show more than 1 line of text in textbox
    make sure the MULTILINE property is set to TRUE

    DocZaf
    {;->

  4. #4
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Smile

    You also can use the vbCrLf instead of vbNewLine command.

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