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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control Arrays

Status
Not open for further replies.

Cndn

Programmer
Nov 22, 2001
22
0
0
CA
Is there a way to write code the effects an entire array?
 
Dim X as integer
for X = 0 to <MaxNumber of Array>
Control(X) --perform action--
Next

replace <MaxNumber of Array> with the appropriate number or variable. This assumes of course that your controls are indexed from 0 to <MaxNumber of Array>.

hope this helps Al
 
Try something like this

Add a textbox and copy it several time to make a control array and then add this code to a command button

Private Sub Command1_Click()
Dim txt As TextBox

For Each txt In Text1
txt.Text = &quot;Filled&quot;
Next
End Sub

Hope this helps Anything is possible, the problem is I only have one lifetime.
[cheers]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top