PDA

Click to See Complete Forum and Search --> : Variable Question......


Smie
Jan 10th, 2000, 11:12 AM
I have set controll textboxes, eg.

DAY(0).text = "Hello"
DAY(1).text = "Hello"
DAY(2).text = "Hello"
and so on..........

Is there a way I can take the entire DAY and instead of having to put all the extra lines of code, just use one line to represent all the DAY s? Like having

DAY.text = "Hello"

and all the Day.texts change?
I appreciate any help. Thanks

Aaron Young
Jan 10th, 2000, 11:22 AM
You could use a FOR.. EACH Loop, ie.

Private Sub Command1_Click()
For Each TextBox In txtDay
TextBox.Text = "Hello"
Next
End Sub

This would set the Text Property of all the Textboxes in the txtDay Control Array to "Hello".


------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
ajyoung@pressenter.com

Smie
Jan 10th, 2000, 11:23 AM
thanks Aaron!