title: Remove Dynamically Added Controls from Userform
body: <p>I have an Excel userform with dynamically added checkboxes.</p>
  
  <p>I add the checkboxes with code that looks like this:</p>
  
  <pre><code>Set chkBox = Me.Controls.Add("Forms.Checkbox.1", "Checkbox" &amp; i)
  </code></pre>
  
  <p>I want to remove all of these checkboxes.</p>
  
  <pre><code>Dim j As Integer
  'Remove all dynamically updated checkboxes
  For Each cont In Me.Controls
      For j = 1 To NumControls
          If cont.Name = "Checkbox" &amp; j Then
              Me.Controls.Remove ("Checkbox" &amp; j)
          End If
      Next j
  Next cont
  </code></pre>
  
  <p>I get the following error message:<br>
  <img src="https://i.stack.imgur.com/bCLRA.png" alt="Error MEssage"></p>