title: Issue with deleting dynamically created textboxes in a userform
body: <p>My issue concerns deleting textboxes dynamically on my userform. On the userform there is a spin button which the user can use to create textboxes at their discretion. As I spin the spin button upwards it will create text boxes up to a maximum amount which I set. However when I spin the button backwards it will only delete the most recently created text box and will not delete any more.</p>
  
  <p>The Code creating the boxes is as follows</p>
  
  <pre><code>Private Sub AgendaFromBox_Change()
  Dim BoxValue As Integer
  BoxValue = AgendaFromBox.Value
      If BoxValue &gt; 10 Then
          AgendaFromBox.Value = 10
          Exit Sub
      End If
      If BoxValue = 0 Then
          Exit Sub
      End If
  Dim NewBox As Control
  Dim NewLabel As Control
  For i = 1 To BoxValue
  Set NewBox = Me.Controls.Add("Forms.Textbox.1")
  Set NewLabel = Me.Controls.Add("Forms.Label.1")
      With NewBox
          .Name = "AgendaBox" &amp; i
          .Top = 100 + 30 * i
          .Left = 20
          .Width = 100
          .Height = 20
          .ControlSource = "'Hidden'!C" &amp; 2 + i
      End With
      With NewLabel
          .Name = "AgendaLabel" &amp; i
          .Top = 100 + 30 * i
          .Left = 5
          .Width = 14
          .Height = 20
          .Caption = i &amp; "."
      End With
  Worksheets("Hidden").Range("B" &amp; 2 + i) = i
  Next i
  
  NumOutBefore = BoxValue
  
  
  
  End Sub
  </code></pre>
  
  <p>This code is part of a change event for a textbox that is linked to the spin button. The code for deleting the boxes is as follows.</p>
  
  <pre><code>Private Sub AgendaFromSpinner_Change()
  AgendaFromBox.Value = AgendaFromSpinner.Value
  Dim BoxValue1 As Integer
  Static NumOutBefore As Integer
  BoxValue1 = AgendaFromBox.Value
  
  If BoxValue1 &gt; 9 Then Exit Sub
  If BoxValue1 &lt; 1 Then Exit Sub
  If BoxValue1 &lt; NumOutBefore Then
      Controls.Remove "AgendaBox" &amp; i
      Controls.Remove "AgendaLabel" &amp; i
  End If
  
  NumOutBefore = AgendaFromSpinner.Value
  
  End Sub
  </code></pre>
  
  <p>This code is part of the spin button change event. Any thoughts or ideas would be helpful. Thank you in advance.</p>