loyal Posted May 4, 2004 Posted May 4, 2004 Hi all I have several text boxes on my form I am trying to chanage the ReadOnly Property at run time is there any trick that I can do it by For statement ? see the code .................. Dim ctl As Control For Each ctl In Me.Controls If TypeOf ctl Is TextBox Then ctl.BackColor = Color.White 'Here I want to say ctl.ReadOnly = false 'But no Found (*&*) End If Help me Please Quote Gary Says: To be a good programmer, you must be good at debugging
Administrators PlausiblyDamp Posted May 4, 2004 Administrators Posted May 4, 2004 try Dim ctl As Control For Each ctl In Me.Controls If TypeOf ctl Is TextBox Then ctl.BackColor = Color.White DirectCast(ctl, TextBox).ReadOnly = False End If Next Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
loyal Posted May 4, 2004 Author Posted May 4, 2004 Thanks it works I really appreciated it Quote Gary Says: To be a good programmer, you must be good at debugging
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.