dim  text_box  as  object         for  each  text_box  in  form1.controls 
           if type of text_box is TextBox then     
             text_box.text="hello" 
           End if
        next 

解决方案 »

  1.   

    Dim text_box   As Object        For Each text_box In Form1.Controls
                If TypeOf text_box Is TextBox Then
                    text_box.Text = "hello"
                End If
            Next
      

  2.   

    dim  text_box  as  object         for  each  text_box  in  form1.controls 
               if typeof text_box is TextBox then     
                 text_box.text="hello" 
               End if
            next 
      

  3.   

    非常感谢 二位,thank you!