• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

using textbox

Hi~
I am trying to print loop and cha. together in the textbox. I used this.

 Text1.Text = j
    For i = 1 To n
         j = arry(i)
         j = "th array"
    Next i

Help me pleas~
0
jonglim
Asked:
jonglim
2 Solutions
 
hongjunCommented:
Perhaps you can try placing the Text1.Text=j in the loop.

    Text1.Text = ""
    For i = 1 To n
         j = arry(i)
         j = "th array"
        Text1.Text = Text1.Text & j
    Next i



Or this if you want the char to be multiline
In design mode, make Multiline property of the Text1 to True
    Text1.Text = ""
    For i = 1 To n
         j = arry(i)
         j = "th array"
        Text1.Text = Text1.Text & vbCrlf & j
    Next i


hongjun
0
 
Arthur_WoodCommented:
change this:

Text1.Text = ""
   For i = 1 To n
        j = arry(i)
        j = "th array"
       Text1.Text = Text1.Text & vbCrlf & j
   Next i


to:

Text1.Text = ""
   For i = 1 To n
        j = arry(i) & "th array"        
       Text1.Text = Text1.Text & vbCrlf & j
   Next i
0
 
hongjunCommented:
Oh my carelessness.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Arthur_WoodCommented:
also, this can be shortened to:


Text1.Text = ""
  For i = 1 To n      
      Text1.Text = Text1.Text & arry(i) & "th array" & vbCrlf
  Next i

0
 
CleanupPingCommented:
jonglim:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
hongjunCommented:
split b/w Arthur_Wood(Accepted - 40) and hongjun(35)
0
 
DanRollinsCommented:
Moderator, my recommended disposition is:

    Split points between: hongjun and Arthur_Wood

DanRollins -- EE database cleanup volunteer
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now