Nomis_Eswod
Board Regular
- Joined
- Jul 27, 2005
- Messages
- 153
Hi,
I know you can use With...End With to reduce the amount of times you have to write something like TextBox1.BackColor = ....., TextBox1.Value = ..... So you just do..
But I actually want to do it the other way round. I.e. with TexBoxes 1-12 I want to change the backcolor and lock them all. Reading the help it would appear you cannot nest multiple controls within a With statement, do you know if there is any other way of doing it so I don't have to write With...End With statements 12 times??
Many thanks!
I know you can use With...End With to reduce the amount of times you have to write something like TextBox1.BackColor = ....., TextBox1.Value = ..... So you just do..
Code:
With TextBox1
.BackColor = .....
.Value = .....
End With
But I actually want to do it the other way round. I.e. with TexBoxes 1-12 I want to change the backcolor and lock them all. Reading the help it would appear you cannot nest multiple controls within a With statement, do you know if there is any other way of doing it so I don't have to write With...End With statements 12 times??
Many thanks!