I have 18 text boxes named 'txtmybox' with indexes set as 0 to 17.

To change the back color I currently use a for..next loop ie:

for x = 0 to 17
txtmybox(x).backcolor=red
next x


The question is - is there a quicker way to perform this task, ie change all boxes in one go?


thanks

As ChrisPadgham said..that is a simplest way.
This following is other way (But Still needed to use Looping):

For Each controlx In Form1.Controls
    If TypeOf controlx Is TextBox Then controlx.BackColor = vbRed
Next controlx