467,115 Members | 1,310 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,115 developers. It's quick & easy.

displaying multiple variables in one textbox or caption

Is it possible to display more than one variable (one after another on the same line) in a text box or list box or label caption?? Having difficulty with this one... thank you.
Nov 9 '06 #1
  • viewed: 13744
Share:
4 Replies
Expert 8TB
Is it possible to display more than one variable (one after another on the same line) in a text box or list box or label caption?? Having difficulty with this one... thank you.
For a textbox, you need to turn on the .Multiline property.

Otherwise, there shouldn't be any problem - just concatenate using the & operator. If any further difficulty, try posting your code here.
Nov 10 '06 #2
For a textbox, you need to turn on the .Multiline property.

Otherwise, there shouldn't be any problem - just concatenate using the & operator. If any further difficulty, try posting your code here.

Turning multiline works if I want to display variables one under the other... however, I want to display variables one beside the other.

ex.
for i = 1 to 10
txtBox.text= strVariable(i)
next i

strVariable is an array that has 10 different values. I want them all to appear one beside the other!! Can't do it so far... is there a way? Thanks for your help.
Nov 10 '06 #3
mra
Turning multiline works if I want to display variables one under the other... however, I want to display variables one beside the other.

ex.
for i = 1 to 10
txtBox.text= strVariable(i)
next i

strVariable is an array that has 10 different values. I want them all to appear one beside the other!! Can't do it so far... is there a way? Thanks for your help.
hi please try this, if u mean it
for i = 1 to 10
txtBox.text= txtBox.text & strVariable(i)
next i
Nov 10 '06 #4
Expert 8TB
Turning multiline works if I want to display variables one under the other... however, I want to display variables one beside the other.
Sorry, I should have read your message more carefully. mra's suggestion should do the trick.

You might also want to insert a space or a vbTab between them, as in...
Expand|Select|Wrap|Line Numbers
  1. for i = 1 to 10
  2.   txtBox.text= txtBox.text & vbTab & strVariable(i)
  3. next
Nov 10 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

10 posts views Thread by Johnny Lin | last post: by
1 post views Thread by Geraldine Hobley | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.