atten() As cFlatControl
Private m_iCount As Long

Private Sub chkEnabled_Click()
Dim i As Long
Dim bEnabled As Boolean
Dim ctl As Control
   For Each ctl In Me.Controls
      On Error Resume Next
      If TypeName(ctl) &lt;&gt; "CheckBox" Then
         bEnabled = (chkEnabled.Value = Checked)
         ctl.Enabled = bEnabled
         If (TypeOf ctl Is ComboBox) Or (TypeOf ctl Is TextBox) Then
            ctl.BackColor = IIf(bEnabled, vbWindowBackground, vbButtonFace)
         End If
      End If
   Next ctl
E