For Each c As Control In Me.Controls If TypeOf c Is TextBox Then CType(c, TextBox).ReadOnly = True End If Next