Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arrays and Text.text

Status
Not open for further replies.

CompLvr

Programmer
Jul 13, 1999
1
0
0
US
Visit site
How would I go about assigning a value in an array to to a text3.text box?
 
CompLvr,<br>
<br>
Not certain I understand thw question, but I'll try to answer what I _think_ it is &lt;grin!&gt;.<br>
<br>
Generally speaking, the easiest way to assign array values to text boxes is to make the text boxes a control array with the same indices, i.e., text(1).text=array(1). Then you could step through the array something like<br>
_____________<br>
for i=0 to n<br>
Text(i).text=array(i)<br>
next n<br>
________________<br>
<br>
If you just need to supply one particular value of an array to a text box, e.g., creating a calculator, you would probably need to base the array element upon some click event or keypress. For instance, clicking a particular button would trigger the code<br>
________________<br>
sub button_click(ind as integer)<br>
textbox.text=textbox.text & ind<br>
-or-<br>
textbox.text=textbox.text & array(ind)<br>
end sub<br>
________________<br>
<br>
If this does not help you to address your problem, try restating it and I'll try again. Sometimes it is difficult for me to understand a question because of my own interpretation.<br>
<br>
make a good day . . .<br>
. . . barn<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top