因特殊需求
 Combobox 引用的是 Microsoft   Form   2.0   Object   Library 的            Dim Ctl     As Control
            For Each Ctl In Me.Controls
                   If TypeOf Ctl Is VB.ComboBox Then
                    Ctl.Text = ""
                End If
            Next现在使用这个遍历不到,求助!

解决方案 »

  1.   

        Dim Ctl As Control
        For Each Ctl In Me.Controls
               If TypeOf Ctl Is VB.VBControlExtender Then
                Ctl.Text = ""
            End If
        Next
      

  2.   

    下面这个才对:
        Dim Ctl As Control
        For Each Ctl In Me.Controls
               If TypeOf Ctl Is MsForms.ComboBox Then
                Ctl.Text = ""
            End If
        Next
      

  3.   

    Private Sub Form_Load()
    ComboBox1.Text = "qq"
                Dim Ctl     As Control
                For Each Ctl In Me.Controls
                       If TypeOf Ctl Is MSForms.ComboBox Then
                        Ctl.Text = ""
                    End If
                NextEnd Sub